udevadm: don't claim a sysattr was write only just because we get EPERM on read
it might be totally inaccessible, hence weaken our language a bit and
just say "not readable", thus making not claim whether it is writable or
not.
Follow-up for 3a90bef55a
This commit is contained in:
committed by
Yu Watanabe
parent
3a17ffa68e
commit
a24e3938e8
@@ -16,6 +16,7 @@
|
||||
#include "device-private.h"
|
||||
#include "device-util.h"
|
||||
#include "dirent-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "sort-util.h"
|
||||
#include "static-destruct.h"
|
||||
@@ -117,8 +118,8 @@ static int print_all_attributes(sd_device *device, bool is_parent) {
|
||||
if (len > 0)
|
||||
continue;
|
||||
|
||||
} else if (r == -EPERM)
|
||||
value = "(write-only)";
|
||||
} else if (ERRNO_IS_PRIVILEGE(r))
|
||||
value = "(not readable)";
|
||||
else
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user