~ecryptfs/ecryptfs/trunk

« back to all changes in this revision

Viewing changes to src/testcases/stat_symlink.c

  • Committer: Dustin Kirkland
  • Date: 2016-02-27 00:00:23 UTC
  • Revision ID: kirkland@ubuntu.com-20160227000023-h0e4oui5y1vbaurd
openingĀ 112

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <sys/types.h>
2
 
#include <sys/stat.h>
3
 
#include <unistd.h>
4
 
#include <errno.h>
5
 
 
6
 
int main(int argc, char *argv[])
7
 
{
8
 
        int rc;
9
 
        struct stat stat_data;
10
 
 
11
 
        rc = stat(argv[1], &stat_data);
12
 
        if (rc) {
13
 
                printf("rc = [%d]; errno = [%m]\n", rc, errno);
14
 
                goto out;
15
 
        }
16
 
        printf("st_size = [%lu]\n", stat_data.st_size);
17
 
out:
18
 
        return rc;
19
 
}