fprintf(out,
" %s\n", USAGE_COLORS_DEFAULT);
fputs(_(" -l, --list display partitions and exit\n"), out);
+ fputs(_(" -x, --list-details like --list but with more details\n"), out);
+
fputs(_(" -o, --output <list> output columns\n"), out);
fputs(_(" -t, --type <type> recognize specified partition table type only\n"), out);
fputs(_(" -u, --units[=<unit>] display units: 'cylinders' or 'sectors' (default)\n"), out);
enum {
ACT_FDISK = 0, /* default */
ACT_LIST,
+ ACT_LIST_DETAILS,
ACT_SHOWSIZE
};
{ "getsz", no_argument, NULL, 's' },
{ "help", no_argument, NULL, 'h' },
{ "list", no_argument, NULL, 'l' },
+ { "list-details", no_argument, NULL, 'x' },
{ "sector-size", required_argument, NULL, 'b' },
{ "type", required_argument, NULL, 't' },
{ "units", optional_argument, NULL, 'u' },
fdisk_set_ask(cxt, ask_callback, NULL);
- while ((c = getopt_long(argc, argv, "b:Bc::C:hH:lL::o:sS:t:u::vVw:W:",
+ while ((c = getopt_long(argc, argv, "b:Bc::C:hH:lL::o:sS:t:u::vVw:W:x",
longopts, NULL)) != -1) {
switch (c) {
case 'b':
case 'l':
act = ACT_LIST;
break;
+ case 'x':
+ act = ACT_LIST_DETAILS;
+ break;
case 'L':
colormode = UL_COLORMODE_AUTO;
if (optarg)
switch (act) {
case ACT_LIST:
+ case ACT_LIST_DETAILS:
fdisk_enable_listonly(cxt, 1);
+
+ if (act == ACT_LIST_DETAILS)
+ fdisk_enable_details(cxt, 1);
+
init_fields(cxt, outarg, NULL);
if (argc > optind) {