Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/usr.sbin/sysinst Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/87e819b929a7
branches:  netbsd-8
changeset: 435045:87e819b929a7
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Jun 09 15:19:27 2018 +0000

description:
Pull up following revision(s) (requested by joerg in ticket #869):

        usr.sbin/sysinst/arch/mvme68k/md.c: revision 1.5
        usr.sbin/sysinst/net.c: revision 1.24
        usr.sbin/sysinst/partman.c: revision 1.22
        usr.sbin/sysinst/menus.mi: revision 1.12
        usr.sbin/sysinst/arch/i386/md.c: revision 1.8
        usr.sbin/sysinst/arch/alpha/md.c: revision 1.3
        usr.sbin/sysinst/bsddisklabel.c: revision 1.3
        usr.sbin/sysinst/arch/x68k/md.c: revision 1.5
        usr.sbin/sysinst/arch/hp300/md.c: revision 1.5
        usr.sbin/sysinst/arch/emips/md.c: revision 1.4
        usr.sbin/sysinst/arch/pmax/md.c: revision 1.3
        usr.sbin/sysinst/arch/mipsco/md.c: revision 1.3
        usr.sbin/sysinst/arch/hppa/md.c: revision 1.3
        usr.sbin/sysinst/util.c: revision 1.8
        usr.sbin/sysinst/defs.h: revision 1.10
        usr.sbin/sysinst/arch/landisk/md.c: revision 1.4

deconst -> __UNCONST, the former involves UB with NULL arithmetic.

diffstat:

 usr.sbin/sysinst/arch/alpha/md.c   |   4 ++--
 usr.sbin/sysinst/arch/emips/md.c   |   4 ++--
 usr.sbin/sysinst/arch/hp300/md.c   |   4 ++--
 usr.sbin/sysinst/arch/hppa/md.c    |   4 ++--
 usr.sbin/sysinst/arch/i386/md.c    |   6 +++---
 usr.sbin/sysinst/arch/landisk/md.c |   4 ++--
 usr.sbin/sysinst/arch/mipsco/md.c  |   4 ++--
 usr.sbin/sysinst/arch/mvme68k/md.c |   4 ++--
 usr.sbin/sysinst/arch/pmax/md.c    |   4 ++--
 usr.sbin/sysinst/arch/x68k/md.c    |   4 ++--
 usr.sbin/sysinst/bsddisklabel.c    |   6 +++---
 usr.sbin/sysinst/defs.h            |   8 +-------
 usr.sbin/sysinst/menus.mi          |   8 ++++----
 usr.sbin/sysinst/net.c             |   4 ++--
 usr.sbin/sysinst/partman.c         |  10 +++++-----
 usr.sbin/sysinst/util.c            |   6 +++---
 16 files changed, 39 insertions(+), 45 deletions(-)

diffs (truncated from 364 to 300 lines):

diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/arch/alpha/md.c
--- a/usr.sbin/sysinst/arch/alpha/md.c  Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/arch/alpha/md.c  Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.2 2014/08/03 16:09:38 martin Exp $ */
+/*     $NetBSD: md.c,v 1.2.20.1 2018/06/09 15:19:27 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -163,7 +163,7 @@
 
        if (error != 0)
                process_menu(MENU_ok,
-                   deconst("Warning: disk is probably not bootable"));
+                   __UNCONST("Warning: disk is probably not bootable"));
 
        return 0;
 }
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/arch/emips/md.c
--- a/usr.sbin/sysinst/arch/emips/md.c  Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/arch/emips/md.c  Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.3 2015/05/10 10:14:02 martin Exp $    */
+/*     $NetBSD: md.c,v 1.3.8.1 2018/06/09 15:19:28 martin Exp $        */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -171,7 +171,7 @@
        if (ask_noyes(NULL)) {
                if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
                    "/bin/dd if=%s of=/dev/reflash0c bs=512", ldr_path))
-                       process_menu(MENU_ok, deconst("Warning: the system "
+                       process_menu(MENU_ok, __UNCONST("Warning: the system "
                            "is probably not bootable"));
        }
 
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/arch/hp300/md.c
--- a/usr.sbin/sysinst/arch/hp300/md.c  Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/arch/hp300/md.c  Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.4 2015/05/10 10:14:02 martin Exp $ */
+/*     $NetBSD: md.c,v 1.4.8.1 2018/06/09 15:19:27 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -193,7 +193,7 @@
        if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
            "/usr/sbin/installboot /dev/r%sc /usr/mdec/uboot.lif", pm->diskdev))
                process_menu(MENU_ok,
-                   deconst("Warning: disk is probably not bootable"));
+                   __UNCONST("Warning: disk is probably not bootable"));
        return 0;
 }
 
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/arch/hppa/md.c
--- a/usr.sbin/sysinst/arch/hppa/md.c   Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/arch/hppa/md.c   Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.2 2014/08/03 16:09:39 martin Exp $    */
+/*     $NetBSD: md.c,v 1.2.20.1 2018/06/09 15:19:28 martin Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -188,7 +188,7 @@
            "/usr/sbin/installboot -v /dev/r%sc /usr/mdec/xxboot",
            pm->diskdev))
                process_menu(MENU_ok,
-                        deconst("Warning: disk is probably not bootable"));
+                        __UNCONST("Warning: disk is probably not bootable"));
        return 0;
 }
 
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/arch/i386/md.c
--- a/usr.sbin/sysinst/arch/i386/md.c   Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/arch/i386/md.c   Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.6.8.2 2018/06/05 08:12:54 bouyer Exp $ */
+/*     $NetBSD: md.c,v 1.6.8.3 2018/06/09 15:19:27 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -251,7 +251,7 @@
        free(bootxx);
        if (rval == 0)
                return 1;
-       process_menu(MENU_ok, deconst(MSG_No_Bootcode));
+       process_menu(MENU_ok, __UNCONST(MSG_No_Bootcode));
        return 0;
 }
 
@@ -380,7 +380,7 @@
                                                                                 
         if (ret != 0)                                                         
                 process_menu(MENU_ok,                                           
-                    deconst("Warning: disk is probably not bootable"));         
+                    __UNCONST("Warning: disk is probably not bootable"));         
 
        return ret;
 }
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/arch/landisk/md.c
--- a/usr.sbin/sysinst/arch/landisk/md.c        Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/arch/landisk/md.c        Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.2 2014/08/03 16:09:40 martin Exp $    */
+/*     $NetBSD: md.c,v 1.2.20.1 2018/06/09 15:19:28 martin Exp $       */
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -136,7 +136,7 @@
 
        if (error != 0)
                process_menu(MENU_ok,
-                   deconst("Warning: disk is probably not bootable"));
+                   __UNCONST("Warning: disk is probably not bootable"));
 
        return 0;
 }
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/arch/mipsco/md.c
--- a/usr.sbin/sysinst/arch/mipsco/md.c Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/arch/mipsco/md.c Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.2 2014/08/03 16:09:40 martin Exp $    */
+/*     $NetBSD: md.c,v 1.2.20.1 2018/06/09 15:19:28 martin Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -165,7 +165,7 @@
        if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
            "/usr/mdec/installboot /dev/r%sc /usr/mdec/bootxx_ffs", pm->diskdev))
                process_menu(MENU_ok,
-                       deconst("Warning: disk is probably not bootable"));
+                       __UNCONST("Warning: disk is probably not bootable"));
        return 0;
 }
 
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/arch/mvme68k/md.c
--- a/usr.sbin/sysinst/arch/mvme68k/md.c        Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/arch/mvme68k/md.c        Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.4 2015/05/10 10:14:03 martin Exp $    */
+/*     $NetBSD: md.c,v 1.4.8.1 2018/06/09 15:19:27 martin Exp $        */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -194,7 +194,7 @@
            "/usr/mdec/installboot %s /usr/mdec/bootxx /dev/r%sa",
            target_expand("/.bootsd"), pm->diskdev))
                process_menu(MENU_ok,
-                       deconst("Warning: disk is probably not bootable"));
+                       __UNCONST("Warning: disk is probably not bootable"));
        return 0;
 }
 
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/arch/pmax/md.c
--- a/usr.sbin/sysinst/arch/pmax/md.c   Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/arch/pmax/md.c   Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.2 2014/08/03 16:09:40 martin Exp $    */
+/*     $NetBSD: md.c,v 1.2.20.1 2018/06/09 15:19:28 martin Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -173,7 +173,7 @@
 
        if (error != 0)
                process_menu(MENU_ok,
-                   deconst("Warning: disk is probably not bootable"));
+                   __UNCONST("Warning: disk is probably not bootable"));
 
        return 0;
 }
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/arch/x68k/md.c
--- a/usr.sbin/sysinst/arch/x68k/md.c   Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/arch/x68k/md.c   Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.4 2015/05/10 10:14:03 martin Exp $ */
+/*     $NetBSD: md.c,v 1.4.8.1 2018/06/09 15:19:27 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -280,7 +280,7 @@
            "/usr/mdec/installboot.new /usr/mdec/sdboot_ufs /dev/r%sa",
            pm->diskdev))
                process_menu(MENU_ok,
-                       deconst("Warning: disk is probably not bootable"));
+                       __UNCONST("Warning: disk is probably not bootable"));
        return 0;
 }
 
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/bsddisklabel.c
--- a/usr.sbin/sysinst/bsddisklabel.c   Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/bsddisklabel.c   Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bsddisklabel.c,v 1.2.20.1 2018/06/05 08:12:54 bouyer Exp $     */
+/*     $NetBSD: bsddisklabel.c,v 1.2.20.2 2018/06/09 15:19:27 martin Exp $     */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -803,7 +803,7 @@
        } else
                rv = -1;
        if (rv != 0) {
-               process_menu(MENU_ok, deconst(MSG_No_Bootcode));
+               process_menu(MENU_ok, __UNCONST(MSG_No_Bootcode));
                return 0;
        }
 #endif
@@ -811,7 +811,7 @@
        fstype = pm->bsdlabel[pm->rootpart].pi_fstype;
        if (fstype == FS_BSDFFS &&
            (pm->bsdlabel[pm->rootpart].pi_flags & PIF_FFSv2) != 0) {
-               process_menu(MENU_ok, deconst(MSG_cannot_ufs2_root));
+               process_menu(MENU_ok, __UNCONST(MSG_cannot_ufs2_root));
                return 0;
        }
 #endif
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/defs.h
--- a/usr.sbin/sysinst/defs.h   Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/defs.h   Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: defs.h,v 1.9.8.1 2018/06/05 08:12:54 bouyer Exp $      */
+/*     $NetBSD: defs.h,v 1.9.8.2 2018/06/09 15:19:27 martin Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -45,12 +45,6 @@
 
 const char *getfslabelname(uint8_t);
 
-static inline void *
-deconst(const void *p)
-{
-       return (char *)0 + ((const char *)p - (const char *)0);
-}
-
 #include "msg_defs.h"
 #include "menu_defs.h"
 
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/menus.mi
--- a/usr.sbin/sysinst/menus.mi Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/menus.mi Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: menus.mi,v 1.11.6.1 2018/06/05 08:12:54 bouyer Exp $   */
+/*     $NetBSD: menus.mi,v 1.11.6.2 2018/06/09 15:19:27 martin Exp $   */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -664,7 +664,7 @@
                                                                };
        option MSG_fmtasraid,   exit, action {
                                                                        if (pm->gpt || pm->isspecial) {
-                                                                               process_menu(MENU_ok, deconst(MSG_notsupported));
+                                                                               process_menu(MENU_ok, __UNCONST(MSG_notsupported));
                                                                                return -1;
                                                                        }
                                                                        pm->unsaved = 1;
@@ -673,7 +673,7 @@
                                                                };
        option MSG_fmtaslvm,    exit, action {
                                                                        if (pm->gpt || pm->isspecial) {
-                                                                               process_menu(MENU_ok, deconst(MSG_notsupported));
+                                                                               process_menu(MENU_ok, __UNCONST(MSG_notsupported));
                                                                                return -1;
                                                                        }
                                                                        pm->unsaved = 1;
@@ -683,7 +683,7 @@
                                                                };
        option MSG_encrypt,             exit, action {
                                                                        if (pm->gpt || pm->isspecial) {
-                                                                               process_menu(MENU_ok, deconst(MSG_notsupported));
+                                                                               process_menu(MENU_ok, __UNCONST(MSG_notsupported));
                                                                                return -1;
                                                                        }
                                                                        pm->unsaved = 1;
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/net.c
--- a/usr.sbin/sysinst/net.c    Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/net.c    Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: net.c,v 1.23 2016/12/13 19:03:49 roy Exp $     */
+/*     $NetBSD: net.c,v 1.23.6.1 2018/06/09 15:19:27 martin Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -964,7 +964,7 @@
        arg_rv arg;
 
        arg.rv = -1;
-       arg.arg = deconst(xfer_type);
+       arg.arg = __UNCONST(xfer_type);
        process_menu(MENU_ftpsource, &arg);
        
        if (arg.rv == SET_RETRY)
diff -r 2060f642d7a2 -r 87e819b929a7 usr.sbin/sysinst/partman.c
--- a/usr.sbin/sysinst/partman.c        Sat Jun 09 15:16:30 2018 +0000
+++ b/usr.sbin/sysinst/partman.c        Sat Jun 09 15:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: partman.c,v 1.15.6.3 2018/05/07 04:06:31 snj Exp $ */
+/*     $NetBSD: partman.c,v 1.15.6.4 2018/06/09 15:19:27 martin Exp $ */
 
 /*



Home | Main Index | Thread Index | Old Index