View | Details | Raw Unified | Return to bug 25337
Collapse All | Expand All

(-)dmesg.c (+5 lines)
Lines 56-61 Link Here
56
#include <unistd.h>
56
#include <unistd.h>
57
#include <vis.h>
57
#include <vis.h>
58
#include <sys/syslog.h>
58
#include <sys/syslog.h>
59
#include <sys/types.h>
59
60
60
struct nlist nl[] = {
61
struct nlist nl[] = {
61
#define	X_MSGBUF	0
62
#define	X_MSGBUF	0
Lines 87-92 Link Here
87
	while ((ch = getopt(argc, argv, "aM:N:")) != -1)
88
	while ((ch = getopt(argc, argv, "aM:N:")) != -1)
88
		switch(ch) {
89
		switch(ch) {
89
		case 'a':
90
		case 'a':
91
			if (getuid() != (uid_t)0) {
92
			  fprintf(stderr,"dmesg: must be root to get all data in the message buffer\n");
93
			  exit(1);
94
			}
90
			all++;
95
			all++;
91
			break;
96
			break;
92
		case 'M':
97
		case 'M':

Return to bug 25337