mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdev: implement option to identify files created by zdev
Enhance the 'chzdev' tool by introducing a new option to discern files created by 'zdev-tools.' The command usage is as follows: $ chzdev --is-owner <file-name> When executed, the command will return an exit code of 0 for all files generated by zdev-tools. In the case of an unknown file, the tool will return the exit code 'EXIT_UNKNOWN_FILE i.e 33.' Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
4c2bfb1d47
commit
f1f80a8a20
@@ -54,6 +54,9 @@ typedef enum {
|
||||
EXIT_GROUP_FAILED = 31, /* CCW group device grouping failed */
|
||||
EXIT_UNGROUP_FAILED = 32, /* CCW group device ungrouping failed */
|
||||
|
||||
/* is-owner related */
|
||||
EXIT_UNKNOWN_FILE = 33, /* The file is not generated by chzdev */
|
||||
|
||||
EXIT_INTERNAL_ERROR = 99, /* An internal error occurred */
|
||||
} exit_code_t;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#define NUM_SITES 11
|
||||
#define NUM_USER_SITES (NUM_SITES - 1)
|
||||
#define SITE_FALLBACK NUM_USER_SITES
|
||||
#define CHZDEV_HEADER "# Generated by chzdev"
|
||||
|
||||
/* Helper to find the availability of site-configuration */
|
||||
#define dev_site_configured(dev, x) (dev->site_specific[(x)].exists && \
|
||||
|
||||
Reference in New Issue
Block a user