Module Name:    src
Committed By:   christos
Date:           Tue Dec  1 16:33:56 UTC 2015

Modified Files:
        src/sbin/gpt: main.c

Log Message:
automatically enforce readonly for the commands that don't need to write.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/gpt/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/gpt/main.c
diff -u src/sbin/gpt/main.c:1.3 src/sbin/gpt/main.c:1.4
--- src/sbin/gpt/main.c:1.3	Tue Dec  1 11:32:19 2015
+++ src/sbin/gpt/main.c	Tue Dec  1 11:33:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.3 2015/12/01 16:32:19 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.4 2015/12/01 16:33:55 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002 Marcel Moolenaar
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #ifdef __RCSID
-__RCSID("$NetBSD: main.c,v 1.3 2015/12/01 16:32:19 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.4 2015/12/01 16:33:55 christos Exp $");
 #endif
 
 #include <stdio.h>
@@ -197,7 +197,7 @@ main(int argc, char *argv[])
 
 	prefix(cmd);
 
-	gpt = gpt_open(dev, flags, verbose, mediasz, secsz);
+	gpt = gpt_open(dev, flags | cmdsw[i]->flags, verbose, mediasz, secsz);
 	if (gpt == NULL)
 		return EXIT_FAILURE;
 

Reply via email to