Linux Device Mapper development
 help / color / mirror / Atom feed
From: agk@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: device-mapper/dmsetup dmsetup.c
Date: 29 Jan 2007 18:37:59 -0000	[thread overview]
Message-ID: <20070129183759.32512.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/dm
Module name:	device-mapper
Changes by:	agk@sourceware.org	2007-01-29 18:37:58

Modified files:
	dmsetup        : dmsetup.c 

Log message:
	add help -c for field list

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/dmsetup/dmsetup.c.diff?cvsroot=dm&r1=1.82&r2=1.83

--- device-mapper/dmsetup/dmsetup.c	2007/01/29 18:18:41	1.82
+++ device-mapper/dmsetup/dmsetup.c	2007/01/29 18:37:57	1.83
@@ -1625,7 +1625,7 @@
 	if (_switches[SORT_ARG] && _string_args[SORT_ARG]) {
 		keys = _string_args[SORT_ARG];
 		buffered = 1;
-		if (!strcmp(c->name, "status") || !strcmp(c->name, "table")) {
+		if (c && (!strcmp(c->name, "status") || !strcmp(c->name, "table"))) {
 			err("--sort is not yet supported with status and table");
 			goto out;
 		}
@@ -1714,12 +1714,13 @@
 	fprintf(out, "Usage:\n\n");
 	fprintf(out, "dmsetup [--version] [-v|--verbose [-v|--verbose ...]]\n"
 		"        [-r|--readonly] [--noopencount] [--nolockfs]\n"
-		"        [-c|--columns] [-o <fields>] [--noheadings] [--separator <separator>]\n\n");
+		"        [-c|--columns] [-o <fields>] [-O|--sort <sort_fields>]\n"
+		"        [--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, "<fields> are comma-separated.  Use 'help -c' 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");
@@ -1738,6 +1739,14 @@
 {
 	_usage(stderr);
 
+	if (_switches[COLS_ARG]) {
+		_switches[OPTIONS_ARG] = 1;
+		_string_args[OPTIONS_ARG] = (char *) "help";
+		_switches[SORT_ARG] = 0;
+	
+		(void) _report_init(NULL);
+	}
+
 	return 1;
 }
 

             reply	other threads:[~2007-01-29 18:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-29 18:37 agk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-10-30 17:52 device-mapper/dmsetup dmsetup.c agk
2008-04-21 16:57 agk
2007-12-05 14:42 agk
2007-12-03 22:53 agk
2007-06-19 16:50 agk
2007-04-27 18:01 agk
2007-01-29 18:45 agk
2007-01-29 18:43 agk
2006-10-12 17:09 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=20070129183759.32512.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox