]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsipc: print numeric permissions for message queues
authordongshengyuan <545258830@qq.com>
Fri, 17 Jul 2026 10:20:18 +0000 (18:20 +0800)
committerdongshengyuan <545258830@qq.com>
Fri, 17 Jul 2026 10:20:18 +0000 (18:20 +0800)
Change:
  Move scols_line_refer_data() outside the else branch.
  Apply this to System V and POSIX message queues.

Before:
  --numeric-perms left PERMS empty for message queues.
  OWNER shifted into the PERMS field in normal output.

Follow:
  9d20ffda794208d26e6b3ed09fbc38d94d0b8fc6
  c457ec945b4457418af6d5d80f4e6357b15cba9b

sys-utils/lsipc.c

index 10d690dc39d5a83be174ab56b2ffa910a141dc97..a555edf7caf6c63938b59128b9c6c9fcda478541 100644 (file)
@@ -914,8 +914,8 @@ static void do_msg(int id, struct lsipc_control *ctl, struct libscols_table *tb)
                                else {
                                        arg = xmalloc(11);
                                        xstrmode(p->msg_perm.mode & 0777, arg);
-                                       rc = scols_line_refer_data(ln, n, arg);
                                }
+                               rc = scols_line_refer_data(ln, n, arg);
                                break;
                        case COL_CUID:
                                rc = scols_line_sprintf(ln, n, "%u", p->msg_perm.cuid);
@@ -1050,8 +1050,8 @@ static void do_posix_msg(const char *name, struct lsipc_control *ctl,
                                else {
                                        arg = xmalloc(11);
                                        xstrmode(p->mode & 0777, arg);
-                                       rc = scols_line_refer_data(ln, n, arg);
                                }
+                               rc = scols_line_refer_data(ln, n, arg);
                                break;
                        case COL_CUID:
                                rc = scols_line_sprintf(ln, n, "%u", p->cuid);