View | Details | Raw Unified | Return to bug 244867 | Differences between
and this patch

Collapse All | Expand All

(-)freebsd-new/sys/kern/kern_mib.c (-4 / +4 lines)
Lines 452-460 Link Here
452
MTX_SYSINIT(bootid_lock, &bootid_lk, "bootid generator lock", MTX_DEF);
452
MTX_SYSINIT(bootid_lock, &bootid_lk, "bootid generator lock", MTX_DEF);
453
453
454
static int
454
static int
455
sysctl_bootid(SYSCTL_HANDLER_ARGS)
455
sysctl_boot_id(SYSCTL_HANDLER_ARGS)
456
{
456
{
457
	static uint8_t boot_id[16];
457
	static uint8_t boot_id[8];
458
	static bool initialized = false;
458
	static bool initialized = false;
459
459
460
	mtx_lock(&bootid_lk);
460
	mtx_lock(&bootid_lk);
Lines 471-478 Link Here
471
	return (SYSCTL_OUT(req, boot_id, sizeof(boot_id)));
471
	return (SYSCTL_OUT(req, boot_id, sizeof(boot_id)));
472
}
472
}
473
SYSCTL_PROC(_kern, OID_AUTO, boot_id,
473
SYSCTL_PROC(_kern, OID_AUTO, boot_id,
474
    CTLTYPE_STRUCT | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_CAPRD,
474
    CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_CAPRD,
475
    NULL, 0, sysctl_bootid, "", "Random boot ID");
475
    NULL, 0, sysctl_boot_id, "LU", "Random boot ID");
476
476
477
/*
477
/*
478
 * The osrelease string is copied from the global (osrelease in vers.c) into
478
 * The osrelease string is copied from the global (osrelease in vers.c) into

Return to bug 244867