Skip to content

Instantly share code, notes, and snippets.

diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index ef371ce..004bb02 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -380,13 +380,31 @@ getuptime(void)
int hdrcnt;
static void
+do_sysctl(struct vmmeter *vmmp, struct vmstats *vmsp, struct vmtotal *totalp)
+{
diff --git a/usr.bin/pkill/pkill.c b/usr.bin/pkill/pkill.c
index d102fab..02f3159 100644
--- a/usr.bin/pkill/pkill.c
+++ b/usr.bin/pkill/pkill.c
@@ -69,7 +69,8 @@
/* Ignore system-processes (if '-S' flag is not specified) and myself. */
#define PSKIP(kp) ((kp)->kp_pid == mypid || \
- (!kthreads && ((kp)->kp_flags & P_KTHREADP) != 0))
+ (!kthreads && ((kp)->kp_flags & P_KTHREADP) != 0) || \
diff --git a/usr.bin/pkill/pkill.c b/usr.bin/pkill/pkill.c
index d102fab..a185db3 100644
--- a/usr.bin/pkill/pkill.c
+++ b/usr.bin/pkill/pkill.c
@@ -68,8 +68,10 @@
#define MAX_PID PID_MAX
/* Ignore system-processes (if '-S' flag is not specified) and myself. */
-#define PSKIP(kp) ((kp)->kp_pid == mypid || \
- (!kthreads && ((kp)->kp_flags & P_KTHREADP) != 0))
#! /bin/sh
#
# Copyright (c) 2014 The DragonFly Project. All rights reserved.
#
# This code is derived from software contributed to The DragonFly Project
# by Antonio Huete <tuxillo@quantumachine.net>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
diff --git a/sys/kern/kern_slaballoc.c b/sys/kern/kern_slaballoc.c
index 77386dd..31dc409 100644
--- a/sys/kern/kern_slaballoc.c
+++ b/sys/kern/kern_slaballoc.c
@@ -586,14 +586,28 @@ powerof2_size(unsigned long size)
*
* MPSAFE
*/
-
#ifdef SLAB_DEBUG
diff --git a/usr.sbin/installer/installer/installer.sh b/usr.sbin/installer/installer/installer.sh
index 51af9aa..3e44c7a 100644
--- a/usr.sbin/installer/installer/installer.sh
+++ b/usr.sbin/installer/installer/installer.sh
@@ -71,7 +71,11 @@ installer_start()
pfi_frontend="cursesvty"
fi
else
- pfi_frontend="cursesx11"
+ if [ "X$TTY_INST" = "X" ]; then
diff --git a/sbin/disklabel64/disklabel64.c b/sbin/disklabel64/disklabel64.c
index afd77ec..05d4747 100644
--- a/sbin/disklabel64/disklabel64.c
+++ b/sbin/disklabel64/disklabel64.c
@@ -119,8 +119,11 @@ extern uint32_t crc32(const void *buf, size_t size);
#define BIG_NEWFS_FRAG 2048U
#define BIG_NEWFS_CPG 64U
+#define PARTOFF(p) (parts[p-1].dp_start * 512LU)
+
diff --git a/sys/platform/vkernel64/platform/init.c b/sys/platform/vkernel64/platform/init.c
index 8183e24..5d1ea92 100644
--- a/sys/platform/vkernel64/platform/init.c
+++ b/sys/platform/vkernel64/platform/init.c
@@ -143,6 +143,9 @@ static int unix_connect(const char *path);
static void usage_err(const char *ctl, ...);
static void usage_help(_Bool);
static void init_locks(void);
+static void handle_term(int);
+
diff --git a/sbin/hammer/cmd_dedup.c b/sbin/hammer/cmd_dedup.c
index 5b4d43d..e307e58 100644
--- a/sbin/hammer/cmd_dedup.c
+++ b/sbin/hammer/cmd_dedup.c
@@ -101,6 +101,7 @@ struct pass2_dedup_entry {
#define DEDUP_PASS2 0x0001 /* process_btree_elm() mode */
static int SigInfoFlag;
+static int SigAlarmFlag;
static int64_t DedupDataReads;
diff --git a/sbin/hammer/cmd_dedup.c b/sbin/hammer/cmd_dedup.c
index 5b4d43d..288020f 100644
--- a/sbin/hammer/cmd_dedup.c
+++ b/sbin/hammer/cmd_dedup.c
@@ -101,6 +101,7 @@ struct pass2_dedup_entry {
#define DEDUP_PASS2 0x0001 /* process_btree_elm() mode */
static int SigInfoFlag;
+static int SigAlrmFlag;
static int64_t DedupDataReads;