From: Enrico Scholz Date: Mon, 19 Jan 2004 18:22:04 +0000 (+0000) Subject: s/S_ISLNK/!S_ISREG/ -> ignore any non-regular files X-Git-Tag: VERSION_0_10~882 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b8d663cd844948ab38f43b94540a62ab533cabd;p=util-vserver.git s/S_ISLNK/!S_ISREG/ -> ignore any non-regular files git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@647 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/src/chxid.c b/util-vserver/src/chxid.c index 42bdd17..0bf737c 100644 --- a/util-vserver/src/chxid.c +++ b/util-vserver/src/chxid.c @@ -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); } diff --git a/util-vserver/src/lsxid.c b/util-vserver/src/lsxid.c index 38d4c83..5388f1a 100644 --- a/util-vserver/src/lsxid.c +++ b/util-vserver/src/lsxid.c @@ -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; diff --git a/util-vserver/src/setattr.c b/util-vserver/src/setattr.c index 959c086..3fc093e 100644 --- a/util-vserver/src/setattr.c +++ b/util-vserver/src/setattr.c @@ -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); } diff --git a/util-vserver/src/showattr.c b/util-vserver/src/showattr.c index e7db359..daa818f 100644 --- a/util-vserver/src/showattr.c +++ b/util-vserver/src/showattr.c @@ -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 {