coreutils
[Top][All Lists]
Advanced

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

Re: [coreutils] [PATCHv2] stat: print SELinux context when available


From: Jim Meyering
Subject: Re: [coreutils] [PATCHv2] stat: print SELinux context when available
Date: Tue, 05 Oct 2010 14:01:58 +0200

Eric Blake wrote:
> On 10/05/2010 03:03 AM, Jim Meyering wrote:
>>> * src/stat.c (default_format): Don't print SELinux context
>>> when in file system (-f) mode, as the context is associated
>>> with the file, not the file system.
>>> Fix logic inversion, so that in terse mode, %C is included
>>> only when is_selinux_enabled and not vice versa.
>>
>> Good catches.  Thanks!
>> The above fixes sound fine.
>
> If %C only operates on files, and not file systems, then why do we
> support %C under -f in the first place?  Wouldn't the better patch be
> to completely remove %C from -f?

Indeed.  That would be better.
If either of you feels like doing that, please update this comment, too:

    /* Very specialized function (modifies FORMAT), just so as to avoid
       duplicating this code between both print_statfs and print_stat.
       Return zero upon success, nonzero upon failure.  */
    static bool ATTRIBUTE_WARN_UNUSED_RESULT
    out_file_context (char const *filename, char *pformat, size_t prefix_len)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]