* @pfd_ino: stores pidfd inode number
*
* If @pfd_ino is not destined to be set, pass it as NULL.
- *
- * Return: On success, 0 is returned.
+ *
+ * Return: On success, 0 is returned.
* On failure, a negative errno number will be returned.
*/
int ul_parse_pid_str(char *pidstr, pid_t *pid_num, ino_t *pfd_ino)
if (!pidstr || !*pidstr || !pid_num)
return -EINVAL;
-
+
num = strtoimax(pidstr, &end, 10);
if (errno == 0 && ((num && num < 1) || (num && num > SINT_MAX(pid_t))))
return -ERANGE;
ul_unref_path(pc);
}
-static void __attribute__((__noreturn__)) list_colunms(const char *table_name,
+static void __attribute__((__noreturn__)) list_columns(const char *table_name,
FILE *out,
int raw,
int json)
}
if (collist)
- list_colunms("lsfd-columns", stdout, ctl.raw, ctl.json); /* print and exit */
+ list_columns("lsfd-columns", stdout, ctl.raw, ctl.json); /* print and exit */
if (argv[optind])
errtryhelp(EXIT_FAILURE);
exit(EXIT_SUCCESS);
}
-static void __attribute__((__noreturn__)) list_colunms(struct findmnt *findmnt)
+static void __attribute__((__noreturn__)) list_columns(struct findmnt *findmnt)
{
size_t i;
struct libscols_table *tb = xcolumn_list_table_new("findmnt-columns", stdout,
}
if (collist)
- list_colunms(&findmnt); /* print end exit */
+ list_columns(&findmnt); /* print end exit */
if (!ncolumns && (findmnt.flags & FL_DF)) {
add_column(COL_SOURCE);
exit(EXIT_SUCCESS);
}
-static void __attribute__((__noreturn__)) list_colunms(void)
+static void __attribute__((__noreturn__)) list_columns(void)
{
struct libscols_table *col_tb = xcolumn_list_table_new(
"lslocks-columns", stdout, raw, json);
}
if (collist)
- list_colunms(); /* print end exit */
+ list_columns(); /* print end exit */
INIT_LIST_HEAD(&proc_locks);
exit(EXIT_SUCCESS);
}
-static void __attribute__((__noreturn__)) list_colunms(bool raw, bool json)
+static void __attribute__((__noreturn__)) list_columns(bool raw, bool json)
{
struct libscols_table *col_tb = xcolumn_list_table_new("lsns-columns", stdout, raw, json);
ls.filter = new_filter(optarg);
break;
case 'H':
- list_colunms(ls.raw, ls.json);
+ list_columns(ls.raw, ls.json);
case 'h':
usage();