mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +03:00
Correct typos in the spl proc handler.
Correct a format typo that causes /proc/sys/kernel/spl/hostid to return a decimal number instead of a hexadecimal number.
This commit is contained in:
parent
d837ae395b
commit
c95b308d12
@ -492,7 +492,7 @@ SPL_PROC_HANDLER(proc_dohostid)
|
|||||||
|
|
||||||
if (write) {
|
if (write) {
|
||||||
/* We can't use spl_proc_doulongvec_minmax() in the write
|
/* We can't use spl_proc_doulongvec_minmax() in the write
|
||||||
* case hear because hostid while a hex value has no
|
* case here because hostid while a hex value has no
|
||||||
* leading 0x which confuses the helper function. */
|
* leading 0x which confuses the helper function. */
|
||||||
rc = proc_copyin_string(str, sizeof(str), buffer, *lenp);
|
rc = proc_copyin_string(str, sizeof(str), buffer, *lenp);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
@ -506,7 +506,7 @@ SPL_PROC_HANDLER(proc_dohostid)
|
|||||||
hw_serial[HW_HOSTID_LEN - 1] = '\0';
|
hw_serial[HW_HOSTID_LEN - 1] = '\0';
|
||||||
*ppos += *lenp;
|
*ppos += *lenp;
|
||||||
} else {
|
} else {
|
||||||
len = snprintf(str, sizeof(str), "%lux", spl_hostid);
|
len = snprintf(str, sizeof(str), "%lx", spl_hostid);
|
||||||
if (*ppos >= len)
|
if (*ppos >= len)
|
||||||
rc = 0;
|
rc = 0;
|
||||||
else
|
else
|
||||||
@ -534,7 +534,7 @@ SPL_PROC_HANDLER(proc_dokallsyms_lookup_name)
|
|||||||
SRETURN(-EEXIST);
|
SRETURN(-EEXIST);
|
||||||
|
|
||||||
/* We can't use spl_proc_doulongvec_minmax() in the write
|
/* We can't use spl_proc_doulongvec_minmax() in the write
|
||||||
* case hear because the address while a hex value has no
|
* case here because the address while a hex value has no
|
||||||
* leading 0x which confuses the helper function. */
|
* leading 0x which confuses the helper function. */
|
||||||
rc = proc_copyin_string(str, sizeof(str), buffer, *lenp);
|
rc = proc_copyin_string(str, sizeof(str), buffer, *lenp);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user