mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Remove extra newline from spa_set_allocator().
zfs_dbgmsg() does not need newline at the end of the message. While there, slightly update/sync FreeBSD __dprintf(). Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16536
This commit is contained in:
@@ -218,12 +218,19 @@ __dprintf(boolean_t dprint, const char *file, const char *func,
|
||||
}
|
||||
|
||||
/*
|
||||
* Get rid of trailing newline.
|
||||
* Get rid of trailing newline for dprintf logs.
|
||||
*/
|
||||
nl = strrchr(buf, '\n');
|
||||
if (nl != NULL)
|
||||
*nl = '\0';
|
||||
if (dprint && buf[0] != '\0') {
|
||||
nl = &buf[strlen(buf) - 1];
|
||||
if (*nl == '\n')
|
||||
*nl = '\0';
|
||||
}
|
||||
|
||||
/*
|
||||
* To get this data:
|
||||
*
|
||||
* $ sysctl -n kstat.zfs.misc.dbgmsg
|
||||
*/
|
||||
__zfs_dbgmsg(buf);
|
||||
|
||||
kmem_free(buf, size);
|
||||
|
||||
Reference in New Issue
Block a user