DragonFly BSD
DragonFly users List (threaded) for 2012-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: /bin/ls vs .dotted files


From: "Jeremy C. Reed" <reed@xxxxxxxxxxxxx>
Date: Fri, 14 Sep 2012 09:30:01 -0500 (CDT)

The ls.c modified by Joy in 1977 included:

        Aflg = getuid() == 0;
...

                case 'A':
                        Aflg = !Aflg;
                        continue;

See that -A didn't enable/disable but simply toggled the behavior.

...

                if (dentry.d_ino==0 ||
                        aflg==0 && dentry.d_name[0]=='.' && (
                        !Aflg ||
                        dentry.d_name[1]=='\0'
                        || dentry.d_name[1]=='.' && 
dentry.d_name[2]=='\0'))
                        continue;

It didn't exist in the 6th or 7th editions (where the code was from).

It was not documented until the code was replaced in 1989 and the 
behaviour changed.

I think the -A documentation regardless of version makes no sense.



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]