From: Ben Gras Date: Fri, 5 Aug 2005 19:16:12 +0000 (+0000) Subject: autopart fixes; halt sends SIGTERM; setup script without quotes; X-Git-Tag: v3.1.0~410 X-Git-Url: http://zhaoyanbai.com/repos/jquery-3.1.1.min.js?a=commitdiff_plain;h=a9b7d3a17228e0d3c7fb6eb4bb2cde6dd435374e;p=minix.git autopart fixes; halt sends SIGTERM; setup script without quotes; MAKEDEV makes random and cmos when called with std --- diff --git a/commands/ibm/autopart.c b/commands/ibm/autopart.c index 0d7843305..4c9a4be27 100755 --- a/commands/ibm/autopart.c +++ b/commands/ibm/autopart.c @@ -1226,8 +1226,9 @@ void check_ind(struct part_entry *pe) /* If there are no other partitions then make this new one active. */ { struct part_entry *pe2; + int i = 0; - for (pe2= table + 1; pe2 < table + 1 + NR_PARTITIONS; pe2++) + for (pe2= table + 1; pe2 < table + 1 + NR_PARTITIONS; pe2++, i++) if (pe2->sysind != NO_PART && (pe2->bootind & ACTIVE_FLAG)) return; @@ -1828,10 +1829,7 @@ void m_read(int ev, object_t *op) stat_start(0); fflush(stdout); - if (((device= open(curdev->name, mode= O_RDWR, 0666)) < 0 - && (errno != EACCES - || (!nordonly && (device= open(curdev->name, mode= O_RDONLY)) < 0))) - ) { + if ((device= open(curdev->name, mode= O_RDWR, 0666)) < 0) { stat_start(1); if(!probing) printf("%s: %s", curdev->name, strerror(errno)); @@ -2602,12 +2600,10 @@ do_autopart(int resultfd) char partbuf[100]; -#if 0 printf("\nThis is your current partition table:\n"); m_dump(orig_table); printf("\nThis will be your new partition table:\n"); m_dump(table); -#endif printf("\nThis is the point of no return. You have selected to install MINIX\n"); printf("into region %d of disk %d. If you agree with this selection, your\n", (int)(r-regions), (int) (curdev-firstdev)); diff --git a/commands/reboot/halt.c b/commands/reboot/halt.c index f5cab5a3b..2459bc97c 100755 --- a/commands/reboot/halt.c +++ b/commands/reboot/halt.c @@ -101,8 +101,11 @@ char **argv; if (fast) { /* But not too fast... */ + signal(SIGTERM, SIG_IGN); + kill(1, SIGTERM); + printf("Sending SIGTERM to all processes ...\n"); + kill(-1, SIGTERM); sleep(1); - } else { /* Run the shutdown scripts. */ signal(SIGHUP, SIG_IGN); diff --git a/commands/scripts/MAKEDEV.sh b/commands/scripts/MAKEDEV.sh index 5402d2660..e4ca4ee56 100755 --- a/commands/scripts/MAKEDEV.sh +++ b/commands/scripts/MAKEDEV.sh @@ -12,7 +12,7 @@ case $#:$1 in set -$- mem fd0 fd1 fd0p0 fd1p0 \ c0d0 c0d0p0 c0d0p0s0 c0d1 c0d1p0 c0d1p0s0 \ c0d2 c0d2p0 c0d2p0s0 c0d3 c0d3p0 c0d3p0s0 \ - tty ttyc1 ttyc2 ttyc3 tty00 tty01 ttyp0 ttyp1 ttyp2 ttyp3 eth klog + tty ttyc1 ttyc2 ttyc3 tty00 tty01 ttyp0 ttyp1 ttyp2 ttyp3 eth klog random cmos ;; 0:|1:-\?) cat >&2 </dev/null || exit -edparams /dev/$root "rootdev=$root; ramimagedev=$root; $cache; main() { echo \"This is the MINIX 3 boot monitor.\"; echo \"MINIX will load in 5 seconds, or press ESC.\"; trap 5000 boot; menu; }; save" || exit +edparams /dev/$root "rootdev=$root; ramimagedev=$root; $cache; main() { echo This is the MINIX 3 boot monitor.; echo MINIX will load in 5 seconds, or press ESC.; trap 5000 boot; menu; }; save" || exit pfile="/usr/src/tools/fdbootparams" echo "Remembering boot parameters in ${pfile}." echo "rootdev=$root; ramimagedev=$root; $cache; save" >$pfile || exit