Skip to content

Commit fbbdc25

Browse files
Zhenhua Huangmhiramat
authored andcommitted
fs/proc: remove redundant comments from /proc/bootconfig
commit 717c7c8 ("fs/proc: Add boot loader arguments as comment to /proc/bootconfig") adds bootloader argument comments into /proc/bootconfig. /proc/bootconfig shows boot_command_line[] multiple times following every xbc key value pair, that's duplicated and not necessary. Remove redundant ones. Output before and after the fix is like: key1 = value1 *bootloader argument comments* key2 = value2 *bootloader argument comments* key3 = value3 *bootloader argument comments* ... key1 = value1 key2 = value2 key3 = value3 *bootloader argument comments* ... Link: https://lore.kernel.org/all/[email protected]/ Fixes: 717c7c8 ("fs/proc: Add boot loader arguments as comment to /proc/bootconfig") Signed-off-by: Zhenhua Huang <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: [email protected] Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
1 parent fec50db commit fbbdc25

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

fs/proc/bootconfig.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ static int __init copy_xbc_key_value_list(char *dst, size_t size)
6262
break;
6363
dst += ret;
6464
}
65-
if (ret >= 0 && boot_command_line[0]) {
66-
ret = snprintf(dst, rest(dst, end), "# Parameters from bootloader:\n# %s\n",
67-
boot_command_line);
68-
if (ret > 0)
69-
dst += ret;
70-
}
65+
}
66+
if (ret >= 0 && boot_command_line[0]) {
67+
ret = snprintf(dst, rest(dst, end), "# Parameters from bootloader:\n# %s\n",
68+
boot_command_line);
69+
if (ret > 0)
70+
dst += ret;
7171
}
7272
out:
7373
kfree(key);

0 commit comments

Comments
 (0)