The NetBSD Project

CVS log for src/sbin/disklabel/main.c

[BACK] Up to [cvs.NetBSD.org] / src / sbin / disklabel

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.35 / (download) - annotate - [select for diffs], Wed May 15 00:47:43 2013 UTC (10 days, 12 hours ago) by christos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.34: +10 -10 lines
Diff to previous 1.34 (colored)

%td is for ptrdiff_t not for off_t

Revision 1.34 / (download) - annotate - [select for diffs], Mon May 13 18:01:08 2013 UTC (11 days, 18 hours ago) by christos
Branch: MAIN
Changes since 1.33: +7 -7 lines
Diff to previous 1.33 (colored)

CVE 1020933: Prevent integer overflow by using wider type

Revision 1.33 / (download) - annotate - [select for diffs], Mon May 13 17:58:50 2013 UTC (11 days, 18 hours ago) by christos
Branch: MAIN
Changes since 1.32: +8 -2 lines
Diff to previous 1.32 (colored)

CVE 1020935: Prevent overflow

Revision 1.32 / (download) - annotate - [select for diffs], Sun May 5 15:59:42 2013 UTC (2 weeks, 5 days ago) by skrll
Branch: MAIN
Changes since 1.31: +3 -2 lines
Diff to previous 1.31 (colored)

Add an arch_endian entry for x86_64.

Revision 1.31 / (download) - annotate - [select for diffs], Fri May 3 21:23:36 2013 UTC (3 weeks ago) by matt
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Make sure to initialize byteorder if native.

Revision 1.30 / (download) - annotate - [select for diffs], Fri May 3 16:39:00 2013 UTC (3 weeks ago) by matt
Branch: MAIN
Changes since 1.29: +4 -4 lines
Diff to previous 1.29 (colored)

Fix tpyos.

Revision 1.29 / (download) - annotate - [select for diffs], Fri May 3 16:05:12 2013 UTC (3 weeks ago) by matt
Branch: MAIN
Changes since 1.28: +276 -26 lines
Diff to previous 1.28 (colored)

Make disklabel a MI tool.  It will use MACHINE/MACHINE_ARCH to determine
the disklabel params as well as allowing command-line options of -M <machine>
and -B {le,be} to specify MACHINE and byteorder to be used.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jan 17 18:33:58 2013 UTC (4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, tls-maxphys-nbase, tls-maxphys-base, agc-symver-base, agc-symver
Changes since 1.27: +2 -12 lines
Diff to previous 1.27 (colored)

move dk_ioctl to a header file for the benefit of x-building.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Apr 8 07:59:53 2012 UTC (13 months, 2 weeks ago) by cyber
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4
Branch point for: tls-maxphys
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

PR bin/45744
from Julian Fagir
Removing options that have had implementations removed.

-b: removed in -r1.4
-s: removed in -r1.2

Revision 1.26 / (download) - annotate - [select for diffs], Tue Aug 30 12:39:52 2011 UTC (20 months, 3 weeks ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: yamt-pagecache
Changes since 1.25: +9 -5 lines
Diff to previous 1.25 (colored)

Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Aug 29 14:34:59 2011 UTC (20 months, 3 weeks ago) by joerg
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

Use __dead

Revision 1.24 / (download) - annotate - [select for diffs], Thu Jan 6 21:39:01 2011 UTC (2 years, 4 months ago) by apb
Branch: MAIN
CVS Tags: cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.23: +18 -13 lines
Diff to previous 1.23 (colored)

Change printf formats to match the data type of the values being
printed.  There's now a lot of PRIu16 and PRIu32, some PRIu8, some
SCNu32, and a few cases where %u and %d were reversed.  Multiplication
of 32-bit and 8-bit values is cast to uint64_t and printed with PRIu64.

Inspired by a report from Patrick Welche on current-users.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jan 6 19:34:28 2011 UTC (2 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.22: +31 -30 lines
Diff to previous 1.22 (colored)

match printf formats and types from Patrick Welche

Revision 1.22 / (download) - annotate - [select for diffs], Tue Jan 5 15:45:26 2010 UTC (3 years, 4 months ago) by tsutsui
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.21: +30 -26 lines
Diff to previous 1.21 (colored)

Add necessary byteswap ops for tools disklabel(8) used with -F option
(treating a target disk as a regular file and suppressing ioctl(2)s)
on reading/writing disklabel in a target file.
This allows cross build enviroment creating bootable disk images
for targets in different endian.
No functional changes to native (non-tools) disklabel(8) command.

Closes PR toolchain/42357.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Nov 28 12:14:53 2009 UTC (3 years, 5 months ago) by tsutsui
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.20: +7 -7 lines
Diff to previous 1.20 (colored)

Don't use #ifdef __${MACHINE_ARCH}__ to enable machine dependent features.
Instead, use proper macro defined in Makefile per ${MACHINE_ARCH}.

__${MACHINE_ARCH}__ doesn't represent an architecture of tool's target
but an architecture of binaries being compiled, so required features
are not prolery enabled or unintentionally enabled on certain host
and target combinations during src/tools build.

Revision 1.20 / (download) - annotate - [select for diffs], Mon May 4 18:09:04 2009 UTC (4 years ago) by mhitch
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

fix sign-compare issues in vax-specific code.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jul 20 01:20:22 2008 UTC (4 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: jym-xensuspend
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)

Revision 1.18 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:08 2008 UTC (5 years ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.17: +2 -9 lines
Diff to previous 1.17 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jun 5 21:48:46 2007 UTC (5 years, 11 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, mjf-devfs-base, mjf-devfs, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: yamt-pf42, mjf-devfs2
Changes since 1.16: +32 -3 lines
Diff to previous 1.16 (colored)

Let the operator use the DISKLABELSECTOR and DISKLABELOFFSET
environment variables to override the sector number, and the
bytes-offset in the sector, where disklabel(8) writes a disklabel.

If disklabel(8) was compiled as a host tool, then the defaults
still come from the port's LABELOFFSET and LABELSECTOR #defines.
Otherwise, the defaults still come from the sysctls, kern.labelsector
and kern.labeloffset.

This change helps me create a bootable CompactFlash image with both
a Master Boot Record (MBR) and a BSD disklabel for the RouterBOARD
153.  The RB 153 is an evbmips board with a CompactFlash slot.  It
searches the MBR on a CompactFlash card for a partition containing
an ELF kernel.  When disklabel(8) is built for evbmips, it will
ordinarily overwrite an MBR with the BSD disklabel.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Apr 12 18:41:23 2007 UTC (6 years, 1 month ago) by matt
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

Remove defunct B from getopt string.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Feb 8 21:36:58 2007 UTC (6 years, 3 months ago) by drochner
Branch: MAIN
Changes since 1.14: +7 -7 lines
Diff to previous 1.14 (colored)

include <signal.h> where signal(3) is used

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jan 17 21:59:50 2007 UTC (6 years, 4 months ago) by hubertf
Branch: MAIN
Changes since 1.13: +2 -3 lines
Diff to previous 1.13 (colored)

Remove more duplicate #includes,
from Slava Semushin <slava.semushin@gmail.com>

Revision 1.13 / (download) - annotate - [select for diffs], Sun Nov 26 16:16:31 2006 UTC (6 years, 5 months ago) by jmmv
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4
Changes since 1.12: +108 -4 lines
Diff to previous 1.12 (colored)

Add a '-l' flag and a 'L' command to interactive mode to list all known
file system types.  (Similar to what fdisk does for partition types.)

Closes PR bin/12954.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jun 25 21:32:39 2006 UTC (6 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.11: +6 -6 lines
Diff to previous 1.11 (colored)

GCC4 fixes from Mike Pumford

Revision 1.11 / (download) - annotate - [select for diffs], Sun Jun 11 15:51:31 2006 UTC (6 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.10: +4 -3 lines
Diff to previous 1.10 (colored)

PR/33695: Arnaud Lacombe: Add compatibility syntax for FreeBSD interoperability.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jun 7 15:27:13 2006 UTC (6 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

fix gcc warning.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Mar 18 11:38:59 2006 UTC (7 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.8: +8 -7 lines
Diff to previous 1.8 (colored)

Coverty 521: fclose() temporary file used when editing label.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Dec 7 04:38:32 2005 UTC (7 years, 5 months ago) by jmc
Branch: MAIN
Changes since 1.7: +2 -3 lines
Diff to previous 1.7 (colored)

Fix acorn builds

Revision 1.7 / (download) - annotate - [select for diffs], Thu Oct 20 20:08:33 2005 UTC (7 years, 7 months ago) by dsl
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Fix alpha build - pointed out by Kurt Schreiner on port-alpha

Revision 1.6 / (download) - annotate - [select for diffs], Wed Oct 19 21:22:21 2005 UTC (7 years, 7 months ago) by dsl
Branch: MAIN
Changes since 1.5: +531 -442 lines
Diff to previous 1.5 (colored)

Rototil the way disklabel -r reads and writes labels.
In particular the 'read' part plays 'hunt the disklabel' in order to get a
label into a local buffer - from where it can be displayed/edited.
The 'write' part makes a separate scan of the disk looking for places to
write the label.
The main changes are:
- It can no longer write the first 8k of the mbr to the pbr (or v.v.)
- All labels on the disk (that it can find) get updated during a write
- With -A all the labels are displayed (inc. those deleted by -D)
- Addition of -D which will delete (by one's complimenting dk_magic{2}) and
  existing labels before writing labels to the expected locations.
- -v gives some verbose output to stderr, -vv more etc
A better basis for processing incorrect endian labels, or labels from other
architectures.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Aug 27 22:21:14 2005 UTC (7 years, 8 months ago) by uwe
Branch: MAIN
Changes since 1.4: +2 -3 lines
Diff to previous 1.4 (colored)

When building as host tool don't include "../../include/util.h".

getlabel{offset,sector} and opendisk functions declared in that file
are not used in this case anyway, and <util.h> pulls in unwatned
includes (e.g. <utmpx.h> doesn't exist on FreeBSD 4.*).

XXX: We can probably undo the #if !HAVE_NBTOOL_CONFIG_H kludge in
<util.h> now.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jun 17 21:20:18 2005 UTC (7 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.3: +16 -266 lines
Diff to previous 1.3 (colored)

Rip out the support for writing bootstrap code.  installboot(8) contains
support for hp300, hp700 and vax, $MACHINE is never arm32.
Fix usage output to only contain progname() once - bug introduced in rev 1.89

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 15 20:49:41 2005 UTC (7 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.2: +4 -10 lines
Diff to previous 1.2 (colored)

Remove the never changed 'bootxx' variable

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 15 20:19:03 2005 UTC (7 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.1: +2 -56 lines
Diff to previous 1.1 (colored)

Remove all the code that was under 'NUMBOOT > 1' nothing has set that for
a long time.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Jun 12 19:18:34 2005 UTC (7 years, 11 months ago) by dyoung
Branch: MAIN

Make disklabel(8) into a host-tool, "nbdisklabel."  Move disklabel.c
to main.c to avoid a name collision with lib/libc/gen/disklabel.c
when we build nbdisklabel.  Still todo: commit host-tool build
infrastructure to src/tools/disklabel/.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>