[BACK]Return to tcfsflag.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tcfs

Diff for /src/usr.bin/tcfs/Attic/tcfsflag.c between version 1.4 and 1.5

version 1.4, 2000/06/19 20:35:48 version 1.5, 2000/06/19 22:42:28
Line 29 
Line 29 
 #include "tcfsdefines.h"  #include "tcfsdefines.h"
   
 tcfs_flags tcfs_getflags(int);  tcfs_flags tcfs_getflags(int);
 tcfs_flags tcfs_setflags(int,tcfs_flags);  tcfs_flags tcfs_setflags(int, tcfs_flags);
   
 int  int
 flags_main(int argc, char *argv[])  flags_main(int argc, char *argv[])
Line 42 
Line 42 
         setuid(getuid());          setuid(getuid());
   
         if (argc < 3) {          if (argc < 3) {
                 fprintf (stderr, "tcfsflags [op]{r,x,g} file\n"                  fprintf(stderr, "tcfsflags [op]{r,x,g} file\n"
                          "\t op can either be + or -.\n\n");                           "\t op can either be + or -.\n\n");
                 exit(1);                  exit(1);
         }          }
   
         fd = open(argv[2],O_RDONLY);          fd = open(argv[2], O_RDONLY);
         if (!fd) {          if (!fd) {
                 fprintf(stderr, "open failed\n");                  fprintf(stderr, "open failed\n");
                 exit(1);                  exit(1);
Line 55 
Line 55 
   
         i = tcfs_getflags(fd);          i = tcfs_getflags(fd);
         if (i.flag == -1) {          if (i.flag == -1) {
                 fprintf(stderr,"getflags error\n");                  fprintf(stderr, "getflags error\n");
                 close(fd);                  close(fd);
                 exit(1);                  exit(1);
         }          }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5