Paul Donald ffb9961c1f file: provide user name and group name lookups for stat listings
This provides more user friendly information than numeric IDs.

Before this patch:

ubus call file list '{"path":"/proc"}'
...
{
	"name": "kcore",
	"type": "file",
	"size": 140737471586304,
	"mode": 33024,
	"atime": 1764716086,
	"mtime": 1764716086,
	"ctime": 1764716086,
	"inode": -268435271,
	"uid": 0,
	"gid": 0,
},
...

After this patch:

ubus call file list '{"path":"/proc"}'
...
{
	"name": "kcore",
	"type": "file",
	"size": 140737471586304,
	"mode": 33024,
	"atime": 1764716086,
	"mtime": 1764716086,
	"ctime": 1764716086,
	"inode": -268435271,
	"uid": 0,
	"gid": 0,
	"user": "root",
	"group": "root"
},
...

Tested on: OpenWrt SNAPSHOT r32139-1f879b8839 / 6.12.59
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/rpcd/pull/22
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-03 22:48:31 +01:00
2021-12-08 20:09:24 +01:00
2021-12-08 20:09:24 +01:00
Description
No description provided
360 KiB
Languages
C 98.8%
CMake 1.2%