s/S_ISLNK/!S_ISREG/ -> ignore any non-regular files
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Mon, 19 Jan 2004 18:22:04 +0000 (18:22 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Mon, 19 Jan 2004 18:22:04 +0000 (18:22 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@647 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/chxid.c
util-vserver/src/lsxid.c
util-vserver/src/setattr.c
util-vserver/src/showattr.c

index 42bdd17..0bf737c 100644 (file)
@@ -98,7 +98,7 @@ bool
 handleFile(char const *name, char const * display_name,
           struct stat const *exp_st)
 {
-  if (S_ISLNK(exp_st->st_mode)) return true;
+  if (!S_ISREG(exp_st->st_mode)) return true;
   
   return setFile(name, display_name, exp_st);
 }
index 38d4c83..5388f1a 100644 (file)
@@ -110,7 +110,7 @@ handleFile(char const *name, char const *display_name,
 
   memset(buf, ' ', sizeof buf);
 
-  if (S_ISLNK(exp_st->st_mode)) {
+  if (!S_ISREG(exp_st->st_mode)) {
     memcpy(buf, "-------", 7);
     write(1, buf, sizeof buf);
     need_write = false;
index 959c086..3fc093e 100644 (file)
@@ -128,7 +128,7 @@ bool
 handleFile(char const *name, char const * display_name,
           struct stat const *exp_st)
 {
-  if (S_ISLNK(exp_st->st_mode)) return true;
+  if (!S_ISREG(exp_st->st_mode)) return true;
   
   return setFlags(name, display_name, exp_st);
 }
index e7db359..daa818f 100644 (file)
@@ -119,7 +119,7 @@ handleFileLegacy(char const *name, char const *display_name,
 {
   long         flags;
 
-  if (S_ISLNK(exp_st->st_mode)) {
+  if (!S_ISREG(exp_st->st_mode)) {
     write(1, display_name, strlen(display_name));
     write(1, "  -\n", 2);
     return true;
@@ -149,7 +149,7 @@ handleFile(char const *name, char const *display_name,
     return handleFileLegacy(name, display_name, exp_st);
 #endif
   
-  if (S_ISLNK(exp_st->st_mode)) {
+  if (!S_ISREG(exp_st->st_mode)) {
     write(1, "--------", 8);
   }
   else {