mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
systemid: Add built-in systemid command.
Make it easy to find the system ID when testing. Also show in general debug output.
This commit is contained in:
parent
fcebf27a9f
commit
36a6c0df46
@ -1,5 +1,6 @@
|
||||
Version 2.02.117 -
|
||||
====================================
|
||||
Add 'lvm systemid' to display the current system ID.
|
||||
Fix configure to properly recognize --with-default-raid10-segtype option.
|
||||
Do not refresh filters/rescan if no signature is wiped during pvcreate.
|
||||
Enforce none external dev info for wiping during pvcreate to avoid races.
|
||||
|
@ -56,6 +56,8 @@ loading \fBlvm.conf\fP(5) and any other configuration files.
|
||||
.TP
|
||||
\fBsegtypes\fP \(em Display recognised Logical Volume segment types.
|
||||
.TP
|
||||
\fBsystemid\fP \(em Display the system ID, if any, currently set on this host.
|
||||
.TP
|
||||
\fBtags\fP \(em Display any tags defined on this host.
|
||||
.TP
|
||||
\fBversion\fP \(em Display version information.
|
||||
|
@ -166,7 +166,7 @@ liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION): liblvm2cmd.$(LIB_SUFFIX)
|
||||
|
||||
.commands: $(srcdir)/commands.h $(srcdir)/cmdnames.h Makefile
|
||||
$(CC) -E -P $(srcdir)/cmdnames.h 2> /dev/null | \
|
||||
egrep -v '^ *(|#.*|devtypes|dumpconfig|formats|help|pvdata|segtypes|tags|version) *$$' > .commands
|
||||
egrep -v '^ *(|#.*|devtypes|dumpconfig|formats|help|pvdata|segtypes|systemid|tags|version) *$$' > .commands
|
||||
|
||||
ifneq ("$(CFLOW_CMD)", "")
|
||||
CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES))
|
||||
|
@ -890,6 +890,11 @@ xx(segtypes,
|
||||
PERMITTED_READ_ONLY,
|
||||
"segtypes\n")
|
||||
|
||||
xx(systemid,
|
||||
"Display the system ID, if any, currently set on this host",
|
||||
PERMITTED_READ_ONLY,
|
||||
"systemid\n")
|
||||
|
||||
xx(tags,
|
||||
"List tags defined on this host",
|
||||
PERMITTED_READ_ONLY,
|
||||
|
@ -977,6 +977,15 @@ static int _merge_synonym(struct cmd_context *cmd, int oldarg, int newarg)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int systemid(struct cmd_context *cmd __attribute__((unused)),
|
||||
int argc __attribute__((unused)),
|
||||
char **argv __attribute__((unused)))
|
||||
{
|
||||
log_print("System ID: %s", cmd->system_id ? : "");
|
||||
|
||||
return ECMD_PROCESSED;
|
||||
}
|
||||
|
||||
int version(struct cmd_context *cmd __attribute__((unused)),
|
||||
int argc __attribute__((unused)),
|
||||
char **argv __attribute__((unused)))
|
||||
@ -1456,6 +1465,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
|
||||
init_dmeventd_monitor(monitoring);
|
||||
|
||||
log_debug("Processing: %s", cmd->cmd_line);
|
||||
log_debug("System ID: %s", cmd->system_id ? : "");
|
||||
|
||||
#ifdef O_DIRECT_SUPPORT
|
||||
log_debug("O_DIRECT will be used");
|
||||
|
Loading…
Reference in New Issue
Block a user