| @@ -1,16 +1,79 @@ | | | @@ -1,16 +1,79 @@ |
1 | $NetBSD: patch-ab,v 1.4 2008/12/26 20:23:45 hasso Exp $ | | 1 | $NetBSD: patch-ab,v 1.5 2013/01/11 13:31:06 joerg Exp $ |
2 | | | 2 | |
3 | --- src/gpart.c.orig 2001-02-07 20:08:08 +0200 | | 3 | --- src/gpart.c.orig 2001-02-07 18:08:08.000000000 +0000 |
4 | +++ src/gpart.c 2008-12-25 21:31:22 +0200 | | 4 | +++ src/gpart.c |
| | | 5 | @@ -69,7 +69,7 @@ int f_skiperrors = 1, berrno = 0; |
| | | 6 | int (*boundary_fun)(disk_desc *,s64_t); |
| | | 7 | unsigned long increment = 'h', gc = 0, gh = 0, gs = 0; |
| | | 8 | s64_t skipsec = 0, maxsec = 0; |
| | | 9 | -FILE *log = 0; |
| | | 10 | +FILE *logfile = 0; |
| | | 11 | |
| | | 12 | |
| | | 13 | |
| | | 14 | @@ -125,26 +125,26 @@ void pr(int type,char *fmt,...) |
| | | 15 | case FATAL : |
| | | 16 | g_mod_deleteall(); |
| | | 17 | if (! f_quiet) fprintf(stderr,EM_FATALERROR,msg); |
| | | 18 | - if (log) |
| | | 19 | + if (logfile) |
| | | 20 | { |
| | | 21 | - fprintf(log,EM_FATALERROR,msg); |
| | | 22 | - fclose(log); |
| | | 23 | + fprintf(logfile,EM_FATALERROR,msg); |
| | | 24 | + fclose(logfile); |
| | | 25 | } |
| | | 26 | exit(1); |
| | | 27 | case ERROR : |
| | | 28 | if (! f_quiet) fprintf(stderr,EM_SIMPLEERROR,msg); |
| | | 29 | - if (log) fprintf(log,EM_SIMPLEERROR,msg); |
| | | 30 | + if (logfile) fprintf(logfile,EM_SIMPLEERROR,msg); |
| | | 31 | break; |
| | | 32 | case WARN : |
| | | 33 | if (! f_quiet) fprintf(stderr,EM_WARNING,msg); |
| | | 34 | - if (log) fprintf(log,EM_WARNING,msg); |
| | | 35 | + if (logfile) fprintf(logfile,EM_WARNING,msg); |
| | | 36 | break; |
| | | 37 | case MSG : |
| | | 38 | if (! f_quiet) fputs(msg,stdout); fflush(stdout); |
| | | 39 | - if (log) fputs(msg,log); |
| | | 40 | + if (logfile) fputs(msg,logfile); |
| | | 41 | break; |
| | | 42 | } |
| | | 43 | - if (log) fflush(log); |
| | | 44 | + if (logfile) fflush(logfile); |
| | | 45 | } |
| | | 46 | |
| | | 47 | |
5 | @@ -300,9 +300,10 @@ static char *get_part_type(int type) | | 48 | @@ -300,9 +300,10 @@ static char *get_part_type(int type) |
6 | { 0x8E, "Linux LVM physical volume" }, | | 49 | { 0x8E, "Linux LVM physical volume" }, |
7 | { 0x93, "Amoeba filesystem" }, | | 50 | { 0x93, "Amoeba filesystem" }, |
8 | { 0x94, "Amoeba bad block table" }, | | 51 | { 0x94, "Amoeba bad block table" }, |
9 | - { 0xA5, "FreeBSD/NetBSD/386BSD" }, | | 52 | - { 0xA5, "FreeBSD/NetBSD/386BSD" }, |
10 | + { 0xA5, "FreeBSD/DragonFly/386BSD or old NetBSD" }, | | 53 | + { 0xA5, "FreeBSD/DragonFly/386BSD or old NetBSD" }, |
11 | { 0xA6, "OpenBSD" }, | | 54 | { 0xA6, "OpenBSD" }, |
12 | { 0xA7, "NEXTSTEP" }, | | 55 | { 0xA7, "NEXTSTEP" }, |
13 | + { 0xA9, "NetBSD" }, | | 56 | + { 0xA9, "NetBSD" }, |
14 | { 0xB7, "BSDI BSD/386 filesystem" }, | | 57 | { 0xB7, "BSDI BSD/386 filesystem" }, |
15 | { 0xB8, "BSDI BSD/386 swap" }, | | 58 | { 0xB8, "BSDI BSD/386 swap" }, |
16 | { 0xC7, "Syrinx" }, | | 59 | { 0xC7, "Syrinx" }, |
| | | 60 | @@ -1750,8 +1751,8 @@ int main(int ac,char **av) |
| | | 61 | } |
| | | 62 | break; |
| | | 63 | case 'l' : |
| | | 64 | - if (log) fclose(log); |
| | | 65 | - if ((log = fopen(optarg,"w")) == 0) |
| | | 66 | + if (logfile) fclose(logfile); |
| | | 67 | + if ((logfile = fopen(optarg,"w")) == 0) |
| | | 68 | pr(FATAL,EM_OPENLOG,optarg); |
| | | 69 | break; |
| | | 70 | case 'L' : |
| | | 71 | @@ -1831,7 +1832,7 @@ int main(int ac,char **av) |
| | | 72 | } |
| | | 73 | } |
| | | 74 | free_disk_desc(d); |
| | | 75 | - if (log) fclose(log); |
| | | 76 | + if (logfile) fclose(logfile); |
| | | 77 | |
| | | 78 | return (f_check ? no_of_incons : 0); |
| | | 79 | } |