From: agk@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: device-mapper ./WHATS_NEW dmsetup/dmsetup.c
Date: 29 Jan 2007 18:18:41 -0000 [thread overview]
Message-ID: <20070129181841.19282.qmail@sourceware.org> (raw)
CVSROOT: /cvs/dm
Module name: device-mapper
Changes by: agk@sourceware.org 2007-01-29 18:18:41
Modified files:
. : WHATS_NEW
dmsetup : dmsetup.c
Log message:
Add dmsetup 'help' command and update usage text.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/WHATS_NEW.diff?cvsroot=dm&r1=1.164&r2=1.165
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/dmsetup/dmsetup.c.diff?cvsroot=dm&r1=1.81&r2=1.82
--- device-mapper/WHATS_NEW 2007/01/29 17:45:32 1.164
+++ device-mapper/WHATS_NEW 2007/01/29 18:18:40 1.165
@@ -1,5 +1,6 @@
Version 1.02.17 -
===================================
+ Add dmsetup 'help' command and update usage text.
Use fixed-size fields in report interface and reorder.
Version 1.02.16 - 25th January 2007
--- device-mapper/dmsetup/dmsetup.c 2007/01/29 17:45:32 1.81
+++ device-mapper/dmsetup/dmsetup.c 2007/01/29 18:18:41 1.82
@@ -1567,10 +1567,10 @@
static const struct dm_report_field_type _report_fields[] = {
/* *INDENT-OFF* */
FIELD_F(TASK, STR, "Name", 16, dm_name, "name", "Name of mapped device.")
-FIELD_F(TASK, STR, "UUID", 32, dm_uuid, "uuid", "Unique identifier for mapped device (optional).")
-FIELD_F(INFO, STR, "Stat", 4, dm_info_status, "status", "Attributes.")
-FIELD_O(INFO, dm_info, NUM, "Maj", major, 3, int32, "major", "Major number.")
-FIELD_O(INFO, dm_info, NUM, "Min", minor, 3, int32, "minor", "Minor number.")
+FIELD_F(TASK, STR, "UUID", 32, dm_uuid, "uuid", "Unique (optional) identifier for mapped device.")
+FIELD_F(INFO, STR, "Stat", 4, dm_info_status, "status", "(L)ive, (I)nactive, (s)uspended, (r)ead-only, read-(w)rite.")
+FIELD_O(INFO, dm_info, NUM, "Maj", major, 3, int32, "major", "Block device major number.")
+FIELD_O(INFO, dm_info, NUM, "Min", minor, 3, int32, "minor", "Block device minor number.")
FIELD_O(INFO, dm_info, NUM, "Open", open_count, 4, int32, "open_count", "Number of references to open device, if requested.")
FIELD_O(INFO, dm_info, NUM, "Targ", target_count, 4, int32, "target_count", "Number of segments in live table, if present.")
FIELD_O(INFO, dm_info, NUM, "Event", event_nr, 6, uint32, "event_nr", "Current event number.")
@@ -1673,10 +1673,13 @@
return _process_all(argc, argv, 0, _display_name);
}
+static int _help(int argc, char **argv, void *data);
+
/*
* Dispatch table
*/
static struct command _commands[] = {
+ {"help", "\n", 0, 0, _help},
{"create", "<dev_name> [-j|--major <major> -m|--minor <minor>]\n"
"\t [-U|--uid <uid>] [-G|--gid <gid>] [-M|--mode <octal_mode>]\n"
"\t [-u|uuid <uuid>]\n"
@@ -1710,14 +1713,17 @@
fprintf(out, "Usage:\n\n");
fprintf(out, "dmsetup [--version] [-v|--verbose [-v|--verbose ...]]\n"
- " [-r|--readonly] [--noopencount] [--nolockfs]\n\n");
+ " [-r|--readonly] [--noopencount] [--nolockfs]\n"
+ " [-c|--columns] [-o <fields>] [--noheadings] [--separator <separator>]\n\n");
for (i = 0; _commands[i].name; i++)
fprintf(out, "\t%s %s\n", _commands[i].name, _commands[i].help);
fprintf(out, "\n<device> may be device name or -u <uuid> or "
"-j <major> -m <minor>\n");
+ fprintf(out, "<fields> are comma-separated. Use -c -o help for list.\n");
fprintf(out, "Table_file contents may be supplied on stdin.\n");
fprintf(out, "Tree options are: ascii, utf, vt100; compact, inverted, notrunc;\n"
- " [no]device, active, open, rw and uuid.\n\n");
+ " [no]device, active, open, rw and uuid.\n");
+ fprintf(out, "\n");
return;
}
@@ -1728,6 +1734,13 @@
"[-o offset] [-f|loop_device] [file]\n\n");
}
+static int _help(int argc, char **argv, void *data)
+{
+ _usage(stderr);
+
+ return 1;
+}
+
static struct command *_find_command(const char *name)
{
int i;
@@ -2096,7 +2109,7 @@
return 1;
}
- if(!strcmp(base, "losetup") || !strcmp(base, "dmlosetup")){
+ if (!strcmp(base, "losetup") || !strcmp(base, "dmlosetup")){
r = _process_losetup_switches(base, argc, argv);
free(namebase);
return r;
next reply other threads:[~2007-01-29 18:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-29 18:18 agk [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-06-18 10:19 device-mapper ./WHATS_NEW dmsetup/dmsetup.c meyering
2008-06-06 18:53 agk
2008-04-21 13:16 agk
2008-04-21 11:59 agk
2007-06-19 15:47 agk
2007-06-15 18:20 agk
2007-06-11 13:20 agk
2007-04-27 15:12 agk
2007-01-29 17:45 agk
2007-01-24 18:09 agk
2006-10-19 15:34 agk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070129181841.19282.qmail@sourceware.org \
--to=agk@sourceware.org \
--cc=dm-cvs@sourceware.org \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.