Specify which output columns to print. Use
.B "--help"
to get a list of all supported columns.
-.IP "\fB\-\-noheadings\fP"
+.IP "\fB\-n, \-\-noheadings\fP"
Do not print a header line.
-
-.IP "\fB\-\-raw\fP"
+.IP "\fB\-u, \-\-notruncate\fP"
+Do not truncate text in columns.
+.IP "\fB\-r, \-\-raw\fP"
Use the raw output format.
.SH OUTPUT
.IP "PATH"
Full path of the lock - if none is found or no permissions to read the path it
-will fallback to the device's mountpoint.
+will fallback to the device's mountpoint. The path might be truncated, use
+.B "--notruncate"
+to get the full path.
.SH NOTES
.nf
};
/* columns descriptions */
-struct colinfo infos[] = {
+static struct colinfo infos[] = {
[COL_SRC] = { "COMMAND", 15, 0, N_("command of the process holding the lock") },
[COL_PID] = { "PID", 5, TT_FL_RIGHT, N_("PID of the process holding the lock") },
[COL_SIZE] = { "SIZE", 4, TT_FL_RIGHT, N_("size of the lock") },
char *size;
};
+static void disable_columns_truncate(void)
+{
+ size_t i;
+
+ for (i = 0; i < NCOLS; i++)
+ infos[i].flags &= ~TT_FL_TRUNC;
+}
+
/*
* Return a PID's command name
*/
" -o, --output <list> define which output columns to use\n"
" -n, --noheadings don't print headings\n"
" -r --raw use the raw output format\n"
+ " -u, --notruncate don't truncate text in columns\n"
" -h, --help display this help and exit\n"
" -V, --version output version information and exit\n"), out);
{ "pid", required_argument, NULL, 'p' },
{ "help", no_argument, NULL, 'h' },
{ "output", required_argument, NULL, 'o' },
+ { "notruncate", no_argument, NULL, 'u' },
{ "version", no_argument, NULL, 'V' },
{ "noheadings", no_argument, NULL, 'n' },
{ "raw", no_argument, NULL, 'r' },
textdomain(PACKAGE);
while ((c = getopt_long(argc, argv,
- "p:o:nrhV", long_opts, NULL)) != -1) {
+ "p:o:nruhV", long_opts, NULL)) != -1) {
switch(c) {
case 'p':
case 'r':
tt_flags |= TT_FL_RAW;
break;
+ case 'u':
+ disable_columns_truncate();
+ break;
case '?':
default:
usage(stderr);