X-Git-Url: https://git.saurik.com/apple/shell_cmds.git/blobdiff_plain/ddb4a88b2f582f98073e02a797c5299d71d9527e..HEAD:/find/ls.c diff --git a/find/ls.c b/find/ls.c index cf84d57..f58d969 100644 --- a/find/ls.c +++ b/find/ls.c @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -38,7 +34,7 @@ static char sccsid[] = "@(#)ls.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/usr.bin/find/ls.c,v 1.17 2004/01/20 09:27:03 des Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/find/ls.c,v 1.23 2011/09/28 18:53:36 ed Exp $"); #include #include @@ -54,9 +50,10 @@ __FBSDID("$FreeBSD: src/usr.bin/find/ls.c,v 1.17 2004/01/20 09:27:03 des Exp $") #include #include #include + #ifdef __APPLE__ -/* definition from utmp.h */ -#define UT_NAMESIZE 8 +#undef MAXLOGNAME +#define MAXLOGNAME 17 #endif /* __APPLE__ */ #include "find.h" @@ -73,18 +70,12 @@ printlong(char *name, char *accpath, struct stat *sb) (void)printf("%6lu %8"PRId64" ", (u_long) sb->st_ino, sb->st_blocks); (void)strmode(sb->st_mode, modep); -#ifdef __APPLE__ - (void)printf("%s %3u %-*s %-*s ", modep, sb->st_nlink, UT_NAMESIZE, - user_from_uid(sb->st_uid, 0), UT_NAMESIZE, -#else /* !__APPLE__ */ (void)printf("%s %3u %-*s %-*s ", modep, sb->st_nlink, MAXLOGNAME - 1, user_from_uid(sb->st_uid, 0), MAXLOGNAME - 1, -#endif /* __APPLE__ */ group_from_gid(sb->st_gid, 0)); if (S_ISCHR(sb->st_mode) || S_ISBLK(sb->st_mode)) - (void)printf("%3d, %3d ", major(sb->st_rdev), - minor(sb->st_rdev)); + (void)printf("%#8jx ", (uintmax_t)sb->st_rdev); else (void)printf("%8"PRId64" ", sb->st_size); printtime(sb->st_mtime);