TIME_INVALID = 0,
TIME_SHORT,
TIME_FULL,
- TIME_ISO,
+ TIME_ISO
};
/*
textdomain(PACKAGE);
atexit(close_stdout);
- ctl->time_mode = TIME_SHORT;
+ ctl->time_mode = 0;
while ((opt = getopt_long(argc, argv, "bceghi:Jmno:PqrstuVz", longopts, NULL)) != -1) {
ctl->bytes = 1;
break;
case 'i':
- id = atoi (optarg);
+ id = strtos32_or_err(optarg, _("failed to parse IPC identifier"));
outmode = OUT_PRETTY;
break;
case OPT_COLON:
if (global && msg + shm + sem == 0)
msg = shm = sem = 1;
+ if (!ctl->time_mode)
+ ctl->time_mode = outmode == OUT_PRETTY ? TIME_FULL : TIME_SHORT;
+
if (outmode == OUT_PRETTY && !optarg) {
/* all columns for lsipc --<RESOURCE> --id <ID> */
for (ncolumns = 0, i = 0; i < ARRAY_SIZE(coldescs); i++)