Imported Upstream version 24.2 upstream/24.2
authorJoachim Wiedorn <joodebian@joonet.de>
Sun, 22 Nov 2015 00:41:18 +0000 (01:41 +0100)
committerJoachim Wiedorn <joodebian@joonet.de>
Sun, 22 Nov 2015 00:41:18 +0000 (01:41 +0100)
32 files changed:
CHANGELOG
Makefile
NEWS
TODO
TOOLS
lilo.lsm
man/lilo-uuid-diskid.8
man/lilo-uuid-diskid.pod
man/lilo.8
man/lilo.pod
man/liloconfig.8
man/liloconfig.pod
readme/README
readme/README.raid1
sample/lilo.example.conf
scripts/liloconfig
src/Makefile
src/common.c
src/common.h
src/device.c
src/edit.c
src/geometry.c
src/geometry.h
src/lilo.c
src/lilo.h
src/mbr.S
src/partition.c
src/partition.h
src/probe.c
src/probe.h
src/shs2.c
src/version.h

index b9a3bc761a77ae9cef5ced255588119cb73f9497..657a0fdb70ae21123fc6d10105902fcd7a127c6f 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,23 @@
+Changes for version 24.2 (22-November-2015) - Joachim Wiedorn
+
+  Sources
+  -------
+    - Remove compile date and time in binary to support reproducible
+        builds (thanks to Dmitry Bogatov).
+    - Remove obsolete hints to /boot/boot.b and other files in README.
+    - Use system derived types to make code safe for both the 32-bit and
+        the 64-bit compilation environment. (thanks to TAMUKI Shoichi)
+
+  General
+  -------
+    - Update sample config file lilo.example.conf and config element
+        'password'.
+    - Upgrade of script liloconfig:
+        * three steps of tests with three-state exit code
+          to give the admin more information about failure.
+    - Update manpage pod files and its manpages.
+
+
 Changes for version 24.1 (17-October-2014) - Joachim Wiedorn
 
   Documentations
index c7f931c934cf4e7aba5f181a0f7f49d2fe4bd4bb..593ce11aa91255fa474d77c7c862d0fd8ceb5469 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 # -*- makefile -*-
 #
-# Copyright 2009-2014 Joachim Wiedorn
+# Copyright 2009-2015 Joachim Wiedorn
 # All rights reserved.
 # 
 # Licensed under the terms contained in the file 'COPYING'
diff --git a/NEWS b/NEWS
index bf32875c1406c31d7d0baacc8c677874f28504c2..eba887eb093564bbe30495c43f364c928c8b2754 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,12 @@ NEWS about project LILO
 (For details see file 'CHANGELOG' in the source directory)
 
 
+Version 24.2  (minor and bugfix update of 24.1)
+
+ o Remove compile date and time in binary.
+ o Add 'password' element into example config file.
+ o Upgrade of liloconfig script and manpage.
+
 Version 24.1  (minor and bugfix update of 24.0)
 
  o Install .dat files of images, too.
diff --git a/TODO b/TODO
index 66ac4b9f60d67f669732f8613f5c374faed86939..cb6fc39120f96fa2bce5a5716e79ef3c9ef95a7c 100644 (file)
--- a/TODO
+++ b/TODO
@@ -7,6 +7,6 @@ TODO for project LILO
 * patching sources because of some warnings while compiling
   with gcc 4.4.x and higher
 
-* Upgrade of all manpages (move to po files).
+* Upgrade of all manpages (move to pot files).
 
 * code cleanup.
diff --git a/TOOLS b/TOOLS
index de534403df83659fa6e87fed2a58449cb3562d65..9a0df15fb2f4175cb4113624ecadec398e036ef9 100644 (file)
--- a/TOOLS
+++ b/TOOLS
@@ -8,17 +8,17 @@ they can be found in:
                at least       tested         programs
 package        version        until          inside
 -----------------------------------------------------------------
-coreutils      6.4.10         8.13           (general)
+coreutils      6.4.10         8.23           (general)
                      
 bcc            0.16.14        0.16.17        bcc
                      
 bin86          0.16.14        0.16.17        as86, ld86
                      
-gcc            3.3.5          4.9.1          gcc
+gcc            3.3.5          5.2.1          gcc
                      
-sharutils      4.6.3          4.14           uuencode, uudecode
+sharutils      4.6.3          4.15.2         uuencode, uudecode
                      
-perl           5.8.4          5.14.2         pod2man
+perl           5.8.4          5.20.2         pod2man
 
 
 
@@ -32,8 +32,8 @@ they can be found in:
                at least       tested         programs
 package        version        until          inside
 -----------------------------------------------------------------
-perl           5.8.8          5.14.2         (general)
+perl           5.8.8          5.20.2         (general)
 
-perl-modules   5.8.8          5.14.2         Getopt::Std,
+perl-modules   5.8.8          5.20.2         Getopt::Std,
                                              Pod::Usage
                                              File::Copy
index 0fd040b47d275c10c8b5ca8cecb0aedbe459659b..b1363e292a87cdbf0a5638345c08d24240ff5185 100644 (file)
--- a/lilo.lsm
+++ b/lilo.lsm
@@ -1,16 +1,16 @@
 Begin4
 Title:                 LILO
-Version:               24.1
-Entered-date:  2014-10-17
+Version:               24.2
+Entered-date:  2015-11-22
 Description:   Generic boot loader for Linux. Distribution 
                includes full source, documentation and support files.  
 Keywords:              Linux, boot loader, LILO
 Author:                        Joachim Wiedorn
-Maintained-by: Joachim Wiedorn <ad_debian@joonet.de>
+Maintained-by: Joachim Wiedorn <joodevel@joonet.de>
 Primary-site:  http://lilo.alioth.debian.org/
 Original-site:  http://lilo.alioth.debian.org/
 Alternate-site:        http://alioth.debian.org/projects/lilo/  (developer's site)
-Files:                 754kB  lilo-24.1.tar.gz
+Files:                 766kB  lilo-24.2.tar.gz
 Platforms:             Linux (>= 2.4.0), 
                gcc (>= 3.3.5), as86 (>= 0.16.14) needed to compile.
                bcc (0.16.14) needed to compile diagnostic disk 2 & DOS *.com.
index 13aa424981e9c2732f508fe6f76c959c6bd68c1b..3c1a88b4d3c8ef79dc5324cbf38cdf24a969bf3b 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
+.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -38,6 +38,8 @@
 .    ds PI \(*p
 .    ds L" ``
 .    ds R" ''
+.    ds C`
+.    ds C'
 'br\}
 .\"
 .\" Escape single quotes in literal strings from groff's Unicode transform.
 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
-.    de IX
-.    tm Index:\\$1\t\\n%\t"\\$2"
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
 ..
-.    nr % 0
-.    rr F
-.\}
-.el \{\
-.    de IX
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+.    if \nF \{
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
 ..
+.        if !\nF==2 \{
+.            nr % 0
+.            nr F 2
+.        \}
+.    \}
 .\}
+.rr rF
 .\" ========================================================================
 .\"
 .IX Title "LILO-UUID-DISKID 8"
-.TH LILO-UUID-DISKID 8 "2014-10-13" "24.1" "lilo documentation"
+.TH LILO-UUID-DISKID 8 "2015-11-22" "24.2" "lilo documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
index 27fb4b990dbb24e848f14ebe9e4463d0a493ffb4..2fd9a1268a240a396b7031cd12b5d1aa44a3a5d5 100644 (file)
@@ -2,8 +2,8 @@
 manpage:  LILO-UUID-DISKID
 section:  8
 title:    lilo documentation
-version:  24.1
-datum:    2014-10-13
+version:  24.2
+datum:    2015-11-22
 
 =encoding utf8
 
index c16e6da92e148285ad90d4791917a8751d15d511..b12bc79514ded2117e502dc0dc00eef79eb00d4b 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
+.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -38,6 +38,8 @@
 .    ds PI \(*p
 .    ds L" ``
 .    ds R" ''
+.    ds C`
+.    ds C'
 'br\}
 .\"
 .\" Escape single quotes in literal strings from groff's Unicode transform.
 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
-.    de IX
-.    tm Index:\\$1\t\\n%\t"\\$2"
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
 ..
-.    nr % 0
-.    rr F
-.\}
-.el \{\
-.    de IX
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+.    if \nF \{
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
 ..
+.        if !\nF==2 \{
+.            nr % 0
+.            nr F 2
+.        \}
+.    \}
 .\}
+.rr rF
 .\" ========================================================================
 .\"
 .IX Title "LILO 8"
-.TH LILO 8 "2014-10-15" "24.1" "lilo documentation"
+.TH LILO 8 "2015-11-22" "24.2" "lilo documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -113,7 +122,7 @@ Normally, only primary partitions [1..4] may be activated, but if the 'Extended
 Master Boot Loader' is present on the Master Boot Record (\s-1MBR\s0) of the device
 (see the \-M option), any partition may be made active.  Whether the actual \s-1OS\s0
 in the partition will boot from a logical partition depends on the characteristics
-of the \s-1OS\s0. \s-1LILO\s0 boot records for Linux may be booted from a logical partition.
+of the \s-1OSLILO\s0 boot records for Linux may be booted from a logical partition.
 .IP "\fB\-b\fR \fIbootdev\fR" 4
 .IX Item "-b bootdev"
 Set the boot device where the boot loader will be installed. For example
@@ -173,7 +182,7 @@ Compare with \fI\-P ignore\fR, which bypasses certain partition table checks.
 .IP "\fB\-g\fR" 4
 .IX Item "-g"
 Generate 'cylinder/head/sector' (\s-1CHS\s0 geometric) disk addresses. Limited to cylinders
-up to 1023. Forces compatibility with very old versions of \s-1LILO\s0 \fI(obsolete switch)\fR.
+up to 1023. Forces compatibility with very old versions of \s-1LILO \s0\fI(obsolete switch)\fR.
 .IP "\fB\-H\fR" 4
 .IX Item "-H"
 Override fatal halt if a \s-1RAID\s0 array does not have all disks active.
@@ -201,7 +210,7 @@ Use another map file instead of the default file /boot/map.
 Install a Master Boot Record on the device specified as master-device, selecting
 the Standard or Extended Master Boot Loader per option. The primary partition
 table on master-device is undisturbed. If no valid Volume-ID (serial number) is
-present, then generate one and write it to the \s-1MBR\s0. If \fImbr\fR is set, the
+present, then generate one and write it to the \s-1MBR.\s0 If \fImbr\fR is set, the
 Standard Master Boot Loader will search partitions 1\-4 for an active flag, and
 boot the flagged partition. Only one active flag is allowed. If \fIext\fR is set,
 the search for an active partition will include logical partitions as well.
@@ -327,7 +336,7 @@ versions is achieved using the \fI'\-x mbr\-only'\fR switch.
 .IX Item "-X"
 Reserved for \s-1LILO\s0 internal use. May produce different output for different \s-1LILO\s0
 versions. The line beginning \*(L"CFLAGS=\*(R" will contain the compiler options used to
-generate this version of \s-1LILO\s0.
+generate this version of \s-1LILO.\s0
 .IP "\fB\-z\fR" 4
 .IX Item "-z"
 When used with the '\-M' switch, clears the Volume-ID.  Usually used in the
@@ -340,7 +349,7 @@ following sequence to generate a new Volume-ID:
 .IP "\fB\-Z\fR \fIoption\fR" 4
 .IX Item "-Z option"
 Tells the boot installer whether special precautions need to be taken because
-the \s-1BIOS\s0 fails to pass the correct device code in \s-1DL\s0 (\-Z0). Or may specify
+the \s-1BIOS\s0 fails to pass the correct device code in \s-1DL \s0(\-Z0). Or may specify
 that the \s-1BIOS\s0 always gets \s-1DL\s0 right (\-Z1). Corresponds to, and overrides, the
 configuration file option 'bios\-passes\-dl='.
 .SH "CONFIG OPTIONS"
@@ -372,7 +381,7 @@ indicated below.
 .SH "BOOT OPTIONS"
 .IX Header "BOOT OPTIONS"
 The  options  described  here may be specified at boot time on the command line
-when a kernel image is booted. These options are processed by \s-1LILO\s0, and are
+when a kernel image is booted. These options are processed by \s-1LILO,\s0 and are
 removed from the command line before it is passed to the kernel, unless otherwise
 noted.
 .IP "\fBlock\fR" 4
@@ -392,13 +401,13 @@ non-IBM-compliant \s-1BIOS\s0's which hang with the lines:
 \&    Loading...............
 \&    BIOS data check
 .Ve
-.IP "\fBvga=[\s-1ASK\s0,EXT,EXTENDED,NORMAL,###,0x###]\fR" 4
+.IP "\fBvga=[\s-1ASK,EXT,EXTENDED,NORMAL\s0,###,0x###]\fR" 4
 .IX Item "vga=[ASK,EXT,EXTENDED,NORMAL,###,0x###]"
 Allows overriding the default video mode upon kernel startup.
 .SH "BOOT ERRORS"
 .IX Header "BOOT ERRORS"
 The  boot process takes place in two stages. The first stage loader is a single
-sector, and is loaded by the \s-1BIOS\s0 or by the loader in the \s-1MBR\s0. It loads the
+sector, and is loaded by the \s-1BIOS\s0 or by the loader in the \s-1MBR.\s0 It loads the
 multi-sector second stage loader, but is very space limited. When the first
 stage  loader  gets  control, it types  the  letter 'L'; when it is ready to
 transfer control to the second stage loader it types the letter 'I'. If any
@@ -426,19 +435,19 @@ codes follows:
 \&    FF  sense operation failed
 .Ve
 .PP
-Error code 40 is generated by the \s-1BIOS\s0, or by \s-1LILO\s0 during the conversion of a
+Error code 40 is generated by the \s-1BIOS,\s0 or by \s-1LILO\s0 during the conversion of a
 linear (24\-bit) disk address to a geometric (C:H:S) address. On older systems
 which do not support lba32 (32\-bit) addressing, this error may also be generated.
 Errors 99 and 9A usually mean the map file ('\-m' or 'map=') is not readable,
 likely because \s-1LILO\s0 was not re-run after some system change, or there is a
 geometry mismatch between what \s-1LILO\s0 used (lilo \-v3 to display) and what is
-actually being used by the \s-1BIOS\s0 (one of the lilo diagnostic  disks, available
+actually being used by the \s-1BIOS \s0(one of the lilo diagnostic  disks, available
 in the source distribution, may be needed to diagnose this problem).
 .PP
 When  the second stage loader has received control from the first stage, it
 prints the letter 'L', and when it has initialized itself, including verifying
 the \*(L"Descriptor Table\*(R" \- the list of kernels/others to boot \- it will print
-the letter \*(L"O\*(R", to form the full word \*(L"\s-1LILO\s0\*(R", in uppercase.
+the letter \*(L"O\*(R", to form the full word \*(L"\s-1LILO\*(R",\s0 in uppercase.
 .PP
 All second stage loader error messages are English text and try to pinpoint,
 more or less successfully, the point of failure.
index 39e6f684d47435ca376d66f9544bdd29c3183a2b..cf2c194cab8a23ed808b28568278827e975b42a4 100644 (file)
@@ -2,8 +2,8 @@
 manpage:  LILO
 section:  8
 title:    lilo documentation
-version:  24.1
-datum:    2014-10-15
+version:  24.2
+datum:    2015-11-22
 
 =encoding utf8
 
index b11d2dd9faa685c5571d07456dbba5ae2b7abea5..e080bccdf17d1b629b005a93152f1a730e9cab97 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
+.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -38,6 +38,8 @@
 .    ds PI \(*p
 .    ds L" ``
 .    ds R" ''
+.    ds C`
+.    ds C'
 'br\}
 .\"
 .\" Escape single quotes in literal strings from groff's Unicode transform.
 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
-.    de IX
-.    tm Index:\\$1\t\\n%\t"\\$2"
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
 ..
-.    nr % 0
-.    rr F
-.\}
-.el \{\
-.    de IX
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+.    if \nF \{
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
 ..
+.        if !\nF==2 \{
+.            nr % 0
+.            nr F 2
+.        \}
+.    \}
 .\}
+.rr rF
 .\" ========================================================================
 .\"
 .IX Title "LILOCONFIG 8"
-.TH LILOCONFIG 8 "2014-10-13" "24.1" "liloconfig documentation"
+.TH LILOCONFIG 8 "2015-11-22" "24.2" "liloconfig documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -108,7 +117,8 @@ Lines in the configuration file /etc/lilo.conf:
 \&
 \&  #large\-memory
 \&  lba32
-\&  boot = /dev/sda
+\&  #boot = /dev/sda
+\&  boot = /dev/disk/by\-id/ata\-SAMSUNG_SV1604N_S01FJ10X999999
 \&  #root = /dev/sda1
 \&  root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
 \&  map = /boot/map
@@ -117,14 +127,12 @@ Lines in the configuration file /etc/lilo.conf:
 \&  prompt
 \&  timeout = 100
 \&  vga = normal
+\&  #password = 
 \&  #default = Linux
 \&
 \&  ### LILO per\-image section ###
 \&
-\&  #boot = /dev/sda
-\&  boot = /dev/disk/by\-id/ata\-SAMSUNG_SV1604N_S01FJ10X999999
-\&
-\&  image = /boot/vmlinuz\-3.12\-trunk\-686
+\&  image = /boot/vmlinuz\-3.17\-trunk\-686
 \&      label = "Linux"
 \&      #root = /dev/sda1
 \&      #root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
@@ -132,9 +140,9 @@ Lines in the configuration file /etc/lilo.conf:
 \&  #   restricted
 \&  #   alias = 1
 \&  #   optional
-\&      initrd = /boot/initrd.img\-3.12\-trunk\-686
+\&      initrd = /boot/initrd.img\-3.17\-trunk\-686
 \&
-\&  image = /boot/vmlinuz\-3.2.0\-4\-686
+\&  image = /boot/vmlinuz\-3.14\-trunk\-686
 \&      label = "Linux Old"
 \&      #root = /dev/sda1
 \&      #root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
@@ -142,11 +150,11 @@ Lines in the configuration file /etc/lilo.conf:
 \&  #   restricted
 \&  #   alias = 2
 \&  #   optional
-\&      initrd = /boot/initrd.img\-3.2.0\-4\-686
+\&      initrd = /boot/initrd.img\-3.14\-trunk\-686
 .Ve
 .SH "COPYRIGHT and LICENSE"
 .IX Header "COPYRIGHT and LICENSE"
-Copyright (C) 2011\-2014 Joachim Wiedorn
+Copyright (C) 2011\-2015 Joachim Wiedorn
 .PP
 This script is free software; you can redistribute it and/or modify
 it under the terms of the \s-1GNU\s0 General Public License as published by 
@@ -154,7 +162,7 @@ the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
-\&\fBlilconfig\fR was written by Joachim Wiedorn.
+\&\fBliloconfig\fR was written by Joachim Wiedorn.
 .PP
 This manual page was written by Joachim Wiedorn <joodevel at joonet.de>.
 .SH "SEE ALSO"
index ce1b31a3709ed6506d1f4811924e38afce797642..b5c91612eacc012fc9e6965bf18fc56c95c60287 100644 (file)
@@ -2,8 +2,8 @@
 manpage:  LILOCONFIG
 section:  8
 title:    liloconfig documentation
-version:  24.1
-datum:    2014-10-13
+version:  24.2
+datum:    2015-11-22
 
 =encoding utf8
 
@@ -59,7 +59,8 @@ Lines in the configuration file /etc/lilo.conf:
 
   #large-memory
   lba32
-  boot = /dev/sda
+  #boot = /dev/sda
+  boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999
   #root = /dev/sda1
   root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
   map = /boot/map
@@ -68,14 +69,12 @@ Lines in the configuration file /etc/lilo.conf:
   prompt
   timeout = 100
   vga = normal
+  #password = 
   #default = Linux
 
   ### LILO per-image section ###
 
-  #boot = /dev/sda
-  boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999
-
-  image = /boot/vmlinuz-3.12-trunk-686
+  image = /boot/vmlinuz-3.17-trunk-686
       label = "Linux"
       #root = /dev/sda1
       #root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
@@ -83,9 +82,9 @@ Lines in the configuration file /etc/lilo.conf:
   #   restricted
   #   alias = 1
   #   optional
-      initrd = /boot/initrd.img-3.12-trunk-686
+      initrd = /boot/initrd.img-3.17-trunk-686
 
-  image = /boot/vmlinuz-3.2.0-4-686
+  image = /boot/vmlinuz-3.14-trunk-686
       label = "Linux Old"
       #root = /dev/sda1
       #root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
@@ -93,11 +92,11 @@ Lines in the configuration file /etc/lilo.conf:
   #   restricted
   #   alias = 2
   #   optional
-      initrd = /boot/initrd.img-3.2.0-4-686
+      initrd = /boot/initrd.img-3.14-trunk-686
 
 =head1 COPYRIGHT and LICENSE
 
-Copyright (C) 2011-2014 Joachim Wiedorn
+Copyright (C) 2011-2015 Joachim Wiedorn
 
 This script is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by 
@@ -106,7 +105,7 @@ the Free Software Foundation; either version 2 of the License, or
 
 =head1 AUTHOR
 
-B<lilconfig> was written by Joachim Wiedorn.
+B<liloconfig> was written by Joachim Wiedorn.
 
 This manual page was written by Joachim Wiedorn <joodevel at joonet.de>.
 
index aee428cf58880ff6a599b3bc2f55bffa96006649..0c61779bf3b3137c4fe1dcee0ef02b20f03855cd 100644 (file)
@@ -214,14 +214,13 @@ LILO is a collection of several programs and other files:
 
 LILO primarily accesses the following parts of the system:
 
-  The root file system partition  is important for two reasons: first, LILO 
+  The root file system partition is important for two reasons: first, LILO 
     sometimes has to tell the kernel where to look for it. Second, it is 
     frequently a convenient place for many other items LILO uses, such as 
     the boot sector, the /boot directory, and the kernels. 
-  The boot sector  contains the first part of LILO's boot loader. It loads 
-    the much larger second-stage loader. Both loaders are typically stored 
-    in the file /boot/boot.b 
-  The kernel  is loaded and started by the boot loader. Kernels typically 
+  The boot sector contains the first part of LILO's boot loader. It loads 
+    the much larger second-stage loader.
+  The kernel is loaded and started by the boot loader. Kernels typically 
     reside in the root directory or in /boot. 
 
 Note that many of the files LILO needs at boot time have to be accessible 
@@ -713,7 +712,6 @@ There are four approaches of how such problems can be solved:
 
 LILO depends on the BIOS to load the following items: 
 
-  - /boot/boot.b 
   - /boot/map (created when running /sbin/lilo) 
   - all kernels 
   - the boot sectors of all other operating systems it boots 
@@ -786,11 +784,10 @@ This case is equivalent to the configurations where only one disk is in the
 system. The Linux boot sector resides on the first hard disk and the second 
 disk is used later in the boot process.
 
-Only the location of the boot sector matters - everything else 
-(/boot/boot.b, /boot/map, the root file system, a swap partition, other 
-Linux file systems, etc.) can be located anywhere on the second disk, 
-provided that the constraints described in section "BIOS restrictions" are 
-met.
+Only the location of the boot sector matters - everything else (/boot/map,
+the root file system, a swap partition, other Linux file systems, etc.)
+can be located anywhere on the second disk, provided that the constraints 
+described in section "BIOS restrictions" are met.
 
 
 Two disks, Linux on second disk, first disk has an extended partition
@@ -2216,21 +2213,12 @@ Some of the files contained in lilo-21.tar.gz:
      Perl script to convert the LaTeX source of the user's guide to plain 
     ASCII. 
 
-Files created after  make  in lilo/ (among others):
+Files created after  make  in lilo source directory (among others):
 
-  lilo/boot.b   
-     Combined boot sector.  make install  puts this file into /boot 
-  lilo/chain.b   
-     Generic chain loader.  make install  puts this file into /boot 
-  lilo/os2_d.b   
-     Chain loader to load OS/2 from the second hard disk.  make install  
-    puts this file into /boot 
   lilo/lilo   
      LILO (map) installer.  make install  puts this file into /sbin 
-  lilo/activate   
-     Simple boot partition setter. 
   lilo/dparam.com   
-     MS-DOS executable of the disk parameter dumper
+     MS-DOS executable of the disk parameter dumper (optional).
 
 
 Normal first-time installation
@@ -2243,8 +2231,8 @@ First, you have to install the LILO files:
   - run  make  to compile and assemble all parts. 
   - run  make install  to copy all LILO files to the directories where 
     they're installed. /sbin should now contain the file lilo, /usr/sbin 
-    should contain keytab-lilo.pl, and /boot should contain boot.b, 
-    chain.b, and os2_d.b. 
+    should contain keytab-lilo.pl and /boot should contain some image
+    files (.bmp).
 
   *  E.g. /usr/src/lilo
 
@@ -2380,7 +2368,7 @@ The basic procedure is quite straightforward (see also section "BIOS
 restrictions"): 
 
   - a file system has to be created on the file system 
-  - the kernel and boot.b have to be copied to the floppy disk 
+  - the kernel has to be copied to the floppy disk 
   - /sbin/lilo has to be run to create the map file 
 
 This can be as easy as
@@ -2388,17 +2376,15 @@ This can be as easy as
 /sbin/mke2fs /dev/fd0
 [ -d /fd ] || mkdir /fd
 mount /dev/fd0 /fd
-cp /boot/boot.b /fd
 cp /zImage /fd
 echo image=/fd/zImage label=linux |
-  /sbin/lilo -C - -b /dev/fd0 -i /fd/boot.b -c -m /fd/map
+  /sbin/lilo -C - -b /dev/fd0 -c -m /fd/map
 umount /fd
 
 The command line of /sbin/lilo is a little tricky.  -C -  takes the 
 configuration from standard input (naturally, one could also write the 
-configuration into a file),  -b /dev/fd0  specifies that the boot sector is 
-written to the floppy disk,  -i /fd/boot.b  takes the first and second 
-stage loaders from the floppy,  -c  speeds up the load process, and  -m 
+configuration into a file),  -b /dev/fd0  specifies that the boot sector
+is written to the floppy disk,  -c  speeds up the load process and  -m 
 /fd/map  puts the map file on the floppy too.
 
 
index 62c57e769f024b77669b6313c58b95de6a8ab412..c2e19153061d3938b06a6e5f5b78c5ae710cb470 100644 (file)
@@ -98,7 +98,7 @@ primary partitions will be described later.
 MORE TERMINOLOGY
 ================
 
-A boot record is "accessible", if it exists on a primary parition,
+A boot record is "accessible", if it exists on a primary partition,
 which may be marked "active"; or it is a Master Boot Record (MBR),
 written to sector 0 of a drive.
 
@@ -310,7 +310,7 @@ location is acceptable, as long as they are within the same RAID
 partition which you are making bootable.
 
 LILO variations:  version 22.2 enforces the placement of the map file
-on the RAID parition.  Version 22.3 eliminates the need for the
+on the RAID partition.  Version 22.3 eliminates the need for the
 boot.b and chain.b files, and relaxes the restriction that the
 message file be on the RAID partition by copying it into the map
 file.  Likewise, any bitmap= file is copied into the map file, so it
index 3bc6724034064eeba38d2eac1026fc77e832aadc..18f9cac5cdc9b181581d2ca8bb90be49367c07cc 100644 (file)
@@ -1,4 +1,4 @@
-# /etc/lilo.conf  -   systemwide LILO configuration (LILO 23)
+# /etc/lilo.conf  -   systemwide LILO configuration (LILO 24)
 # details see in manpages: lilo(8) and lilo.conf(5)
 
 # +-------------------------------------------------------------+
@@ -70,7 +70,8 @@ install = menu
 # The first character of each part sets the text frontcolor, 
 # the second character of earch part sets the text backcolor,
 # an upper-case character sets bold face text (frontcolor).
-# i.g. 'menu-scheme=wm:rw:wm:Wm'. Possible colors: 
+#
+# E.g. 'menu-scheme=wm:rw:wm:Wm'. Possible colors: 
 # k=black, b=blue, g=green, c=cyan, r=red, m=magenta, y=yellow, w=white.
 menu-scheme = Wb:Yr:Wb:Wb
 #menu-title = " DESDEMONA Boot-Manager "
@@ -110,19 +111,40 @@ timeout = 100
 #   vga=ask       stop and ask for user input: choice of text mode
 #   vga=<mode>    use the corresponding text mode number. A list of  
 #                   available modes can be obtained by booting with  
-#                   vga=ask'  and then pressing [Enter].
+#                   'vga=ask' and then pressing [Enter].
+#
 # Another way is the use of frame buffer mode. Then the kernel 
 # will switch from the normal vga text mode (80x25) to the frame
-# buffer mode (if frame buffer support is in the kernel):
-#   vga=0x314      800x600 @ 16 bit
-#   vga=0x317     1024x768 @ 16 bit
-#   vga=0x318     1024x768 @ 24 bit
+# buffer <mode> (if frame buffer support is in the kernel):
+#                   16bit:    32bit:
+#     640x480 :     0x311     0x312
+#     800x600 :     0x314     0x315
+#    1024x768 :     0x317     0x318
+#    1280x960 :     0x365     0x366
+#    1280x1024:     0x31A     0x31B
+#    1400x1050:     0x345     0x346
+#    1600x1200:     0x333     0x334
+#    1680x1050:     0x3D2     0x3D4
+#    1920x1440:     0x337     0x338
 #vga = ask
 vga = normal
 #vga = 0x317
 
 # ---------------------------------------------------------------
 
+# Set a password here and uncomment the 'restricted' lines in
+# the image definitions below. Then a password must be typed
+# to boot anything but a default configuration. If a command
+# line is given, other than one specified by an 'append'
+# statement in this lilo.conf, the password is required, but
+# a standard default boot will not require one.
+#
+# If anyone have access to the console, with this password and
+# the 'restricted' option you prevent booting with something
+# like 'Linux init=/bin/sh' and thus becoming `root' without
+# proper authorization.
+#password = count4this
+
 # Kernel command line options that apply to all installed images go
 # here.  See 'kernel-parameters.txt' in the Linux kernel 'Documentation'
 # directory. I.g. for start into 'init 5' write:  append="5"
@@ -143,6 +165,8 @@ vga = normal
 # usually with the initrd file. Configure all GNU/Linux systems
 # on other partitions, too.
 
+# Warning: labels must be less than 16 characters long.
+
 # first example (default)
 image = /boot/vmlinuz-3.12-1-generic
        label = "Linux"
index 8bb0d11722a33cb651e618acf260e98ce49149b3..55bc593691dc6a326a01bf85cd0a6db1ac7e24d9 100644 (file)
@@ -3,7 +3,7 @@
 #       liloconfig -  creating a new lilo.conf file
 #       
 #       
-#       Copyright 2011-2014 Joachim Wiedorn <joodevel at joonet.de>
+#       Copyright 2011-2015 Joachim Wiedorn <joodevel at joonet.de>
 #       
 #       This program is free software; you can redistribute it and/or modify
 #       it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ use File::Copy;
 #---- global variables
 my $prog = $0;
 $prog =~ s#.*/##;
-my $version = "0.4";
+my $version = "0.5";
 
 #---- parameter check
 # h: help, v: verbose, f: force
@@ -87,36 +87,59 @@ sub main {
 #-------------------- subroutines --------------------
 
 sub create_lilo_conf {
-       
-       my $found = 0;
-       my $exit = 1;
-
-       # search for root device in fstab and convert it
-       $found = detect_root_device();
-
-       # convert root device to boot device
-       if ($found) { $found = convert_boot_device(); }
 
-       # finally write new lilo.conf file
-       if ($found) {
-         if ($opt_u) { $exit = update_lilo_conf(); }
-         else        { $exit = write_lilo_conf(); }
+       my $exit = 1;
+       my $found1 = 0;
+       my $found2 = 0;
+       my $found3 = 0;
+
+       # read fstab and search for root device
+       $found1 = read_fstab();
+
+       ## STEP 1 ##
+       if ($found1 == 0)
+               # nothing found, exit by error
+               { $found2 = 0;}
+       elsif ($found1 == 1)
+               # identify root device: root_dev and root_id
+               { $found2 = convert_root_device(); }
+       elsif ($found1 == 2)
+               # nothing found, but exit successfully
+               { $exit = 0; $found2 = 0;}
+
+       ## STEP 2 ##
+       if ($found2 == 0)
+               # nothing found, exit by error
+               { $found3 = 0;}
+       elsif ($found2 == 1)
+               # convert root device to boot device
+               { $found3 = convert_boot_device(); }
+       elsif ($found2 == 2)
+               # nothing found, but exit successfully
+               { $exit = 0; $found2 = 3;}
+
+       ## STEP 3 ##
+       if ($found3 == 0)
+               # nothing found, exit by error
+               { $exit = 1;}
+       elsif ($found3 == 1) {
+               if ((-f $liloconf) and not (-w $liloconf)) {
+                       print "E: Have no write permissions to $liloconf !\n";
+                       $exit = 1;
+               }
+               else {
+                       # finally write new/updated lilo.conf file
+                       if ($opt_u) { $exit = update_lilo_conf(); }
+                       else        { $exit = write_lilo_conf(); }
+               }
        }
+       elsif ($found3 == 2)
+               # nothing found, but exit successfully
+               { $exit = 0;}
 
        return $exit;
 }
 
-sub detect_root_device {
-       
-       # read fstab and find root device; 
-       my $found = read_fstab();
-
-       # identify root device: root_dev and root_id
-       if ($found) { $found = convert_root_device(); }
-       
-       return $found;
-}
-
 sub read_fstab {
        
        my $root_part;
@@ -152,7 +175,7 @@ sub read_fstab {
                print "E: It seems you want configure the base filesystem \n" .
                      "and I'm therefore simply going to exit successfully \n" .
                      "without trying to actually configure LILO properly. \n";
-               $found = 0;
+               $found = 2;
        }
        if ($broken_fstab) {
                print "E: It seems the file /etc/fstab is not properly \n" .
@@ -182,8 +205,7 @@ sub convert_root_device {
 
                        if (not -l "$uuidpath/$root_id") {
                                if($opt_v) { print "W: could not find UUID for $root_disk!\n"; }
-                               ## than we want use root_dev in lilo.conf
-                               #$found = 0;
+                               # than we will use root_dev in lilo.conf
                        }
                        else {
                                # finally add uuid label
@@ -300,8 +322,7 @@ sub convert_boot_device {
 
                if(not -l "$boot_id") {
                        if($opt_v) { print "W: could not find DISK ID for $boot_disk!\n"; }
-                       ## not so important, than using boot_dev in lilo.conf
-                       #$found = 0;
+                       # not so important. Then using boot_dev in lilo.conf
                }
        }
        
@@ -506,6 +527,7 @@ sub write_bootroot_option {
                        print MYFH_NEW $oldline;
                }
        }
+
        close(MYFH_TMP);
        close(MYFH_NEW);
 }
@@ -515,7 +537,7 @@ sub update_bootroot_option {
        my $oldline = '';
        my $newline = '';
        my $ok = 0;
-       
+
        open(MYFH_NEW, "> $liloconfnew") or die "Cannot open file: $!";
        open(MYFH_TMP, "< $conftmp_2") or die "Cannot read file: $!";
        
@@ -572,6 +594,7 @@ sub update_bootroot_option {
                        print MYFH_NEW $oldline;
                }
        }
+
        close(MYFH_TMP);
        close(MYFH_NEW);
 }
@@ -791,7 +814,8 @@ Lines in the configuration file /etc/lilo.conf:
 
   #large-memory
   lba32
-  boot = /dev/sda
+  #boot = /dev/sda
+  boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999
   #root = /dev/sda1
   root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
   map = /boot/map
@@ -800,14 +824,12 @@ Lines in the configuration file /etc/lilo.conf:
   prompt
   timeout = 100
   vga = normal
+  #password = 
   #default = Linux
 
   ### LILO per-image section ###
 
-  #boot = /dev/sda
-  boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999
-
-  image = /boot/vmlinuz-3.5.0-trunk-686
+  image = /boot/vmlinuz-3.17-trunk-686
       label = "Linux"
       #root = /dev/sda1
       #root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
@@ -815,9 +837,9 @@ Lines in the configuration file /etc/lilo.conf:
   #   restricted
   #   alias = 1
   #   optional
-      initrd = /boot/initrd.img-3.5.0-trunk-686
+      initrd = /boot/initrd.img-3.17-trunk-686
 
-  image = /boot/vmlinuz-3.2.0-4-686
+  image = /boot/vmlinuz-3.14-trunk-686
       label = "Linux Old"
       #root = /dev/sda1
       #root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
@@ -825,11 +847,11 @@ Lines in the configuration file /etc/lilo.conf:
   #   restricted
   #   alias = 2
   #   optional
-      initrd = /boot/initrd.img-3.2.0-4-686
+      initrd = /boot/initrd.img-3.14-trunk-686
 
 =head1 COPYRIGHT and LICENSE
 
-Copyright (C) 2011-2014 Joachim Wiedorn
+Copyright (C) 2011-2015 Joachim Wiedorn
 
 This script is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by 
index 0e766bb9f1c28fcd9032244f4b8277fae7841ab4..9ac890a45cfdd6ce561d86e9fb2a8b03d628ae8f 100644 (file)
@@ -1,6 +1,6 @@
 # -*- makefile -*-
 #
-# Copyright 2009-2014 Joachim Wiedorn
+# Copyright 2009-2015 Joachim Wiedorn
 # All rights reserved.
 # 
 # Licensed under the terms contained in the file 'COPYING'
index cc252075dfca0fd4f67b8aa561a4b11cea86e005..1a86aa18da6cbb8377777894c27260af85995afb 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2005 John Coffman
- * Copyright 2009-2011 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -276,7 +276,7 @@ int main(int argc, char *argv[])
        fprintf(stderr, "*****Fatal:  INT != 4\n");
        return 1;
     }
-    if (sizeof(long)>sizeof(int))
+    if (sizeof(int32_t)>sizeof(int))
        fprintf(stderr, "**Note:  LONG is bigger than INT\n");
        
     return 0;
index fb715eadf5c9baec3006febb3563a22507388a6a..29bbaecabf9487580925dadbf3d8ed3c36b5ad7d 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2005 John Coffman
- * Copyright 2009-2011 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -19,6 +19,9 @@
 #include <sys/stat.h>
 #endif
 
+#include <inttypes.h>
+#define PTR_WIDTH ((int) (sizeof(intptr_t) * 2))
+
 #ifndef PAGE_SIZE
 # define PAGE_SIZE 4096U
 #endif
index 459851af42b47f9704b3d1f0b30410b96b533aed..3abb836d75bd52d1e66cb467a8931b3c66916086 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1997 Werner Almesberger
  * Copyright 1999-2006 John Coffman
- * Copyright 2009-2014 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -886,7 +886,7 @@ static int warned = 0, called = 0;
     struct stat st;
     int duplicate = 0, invalid = 0, ret = 0, ntcaution = 0;
     int raidcaution = 0;
-    long codes = 0L;
+    int32_t codes = 0L;
 
 /* called from  raid_setup  &  from  geo_open */
 /* allow only 1 call */
@@ -1167,7 +1167,7 @@ static int warned = 0, called = 0;
                        walk->next = disktab;
                        vm[j].dt = disktab = walk;
 #if BETA_TEST
-                       if (verbose >= 4) printf("Allocated DT entry for device %04X  ptr=%08lx\n", vm[j].device, (long)walk);
+                       if (verbose >= 4) printf("Allocated DT entry for device %04X  ptr=%0*" PRIxPTR "\n", vm[j].device, , PTR_WIDTH, (intptr_t)walk);
 #endif
                    }
 
@@ -1281,7 +1281,7 @@ static int warned = 0, called = 0;
 
 
 
-    if (verbose>=2) printf("device codes (user assigned pf) = %lX\n", codes);
+    if (verbose>=2) printf("device codes (user assigned pf) = %" PRIX32 "\n", codes);
 
 /* mark those BIOS codes that are already used in the disk=/bios= table */
 
@@ -1311,7 +1311,7 @@ static int warned = 0, called = 0;
        }
     }
 
-    if (verbose>=2) printf("device codes (user assigned) = %lX\n", codes);
+    if (verbose>=2) printf("device codes (user assigned) = %" PRIX32 "\n", codes);
 
     for (i=0; i<ndevs; i++) {
        bios = vm[i].bios.probe;
@@ -1324,7 +1324,7 @@ static int warned = 0, called = 0;
        }
     }
 
-    if (verbose>=2) printf("device codes (BIOS assigned) = %lX\n", codes);
+    if (verbose>=2) printf("device codes (BIOS assigned) = %" PRIX32 "\n", codes);
 
     for (bios=i=0; i<ndevs; i++) {
        int j;
@@ -1346,7 +1346,7 @@ static int warned = 0, called = 0;
            walk->next = disktab;
            vm[i].dt = disktab = walk;
 #if BETA_TEST
-           if (verbose >= 4) printf("Allocated DT entry for device %04X  ptr=%08lx\n", vm[i].device, (long)walk);
+           if (verbose >= 4) printf("Allocated DT entry for device %04X  ptr=%0*" PRIxPTR "\n", vm[i].device, PTR_WIDTH, (intptr_t)walk);
 #endif
        }
        j = vm[i].dt->bios = vm[i].bios.actual;
@@ -1376,7 +1376,7 @@ static int warned = 0, called = 0;
        inited = 1;
     }
 
-    if (verbose>=2) printf("device codes (canonical) = %lX\n", codes);
+    if (verbose>=2) printf("device codes (canonical) = %" PRIX32 "\n", codes);
 
     for (bios=8*sizeof(codes)-1; !(codes&(1L<<bios)) && bios>=0; ) bios--;
 
index 1fa45f2e3160b0ede5006bdc5b761f8264868731..ded9c38d0629f19bd8a640e0417a28a272bb53eb 100644 (file)
@@ -1,7 +1,7 @@
 /* edit.c  -  Bitmap file manipulation and editing
  * 
  * Copyright 2002-2004 John Coffman
- * Copyright 2009-2011 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -193,7 +193,7 @@ static      union {
        } tm;
 static MENUTABLE *menu = &tm.mt;
 static BITMAPLILOHEADER *lh = (void*)(tm.buffer +
-                       ((long)&tm.mt.row - (long)&tm.bmlh.row));
+                       ((intptr_t)&tm.mt.row - (intptr_t)&tm.bmlh.row));
 
 /* a convenience definition */
 #define mn tm.mt
index f033f839de63ed1c08d5693cae4cbd79cdb5e2a9..196a8924d995a4e691c12caa6e7e5322a9863e1f 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2005 John Coffman
- * Copyright 2009-2014 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -55,7 +55,7 @@
 #endif
 
 #ifndef REISERFS_IOC_UNPACK
-#define REISERFS_IOC_UNPACK            _IOW(0xCD,1,long)
+#define REISERFS_IOC_UNPACK            _IOW(0xCD,1,int32_t)
 #endif
 
 #ifndef REISER4_SUPER_MAGIC
@@ -63,7 +63,7 @@
  /* (*(__u32 *)"R4Sb"); */
 #endif
 #ifndef REISER4_IOC_UNPACK
-#define REISER4_IOC_UNPACK      _IOW(0xCD,1,long)
+#define REISER4_IOC_UNPACK      _IOW(0xCD,1,int32_t)
 #endif
 #endif
 
@@ -1268,7 +1268,7 @@ int pass;
        for (walk = disktab; walk; walk = walk->next)
            if (walk->device == (device & D_MASK(device))) break;
 #if BETA_TEST
-    if (verbose>=5) printf("walk=%08lx\n", (long)walk);
+    if (verbose>=5) printf("walk=%0*" PRIxPTR "\n", PTR_WIDTH, (intptr_t)walk);
 #endif
 
 #if 1
index a1c47583a31f2a3c10fa8bd7871a0b9932441b5d..64ca4fe4d2403d39c30b31b82d457d7f4a0fbdbe 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2005 John Coffman
- * Copyright 2009-2011 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -22,7 +22,7 @@ struct hd_geometry {
       unsigned char heads;
       unsigned char sectors;
       unsigned short cylinders;
-      unsigned long start;
+      uint32_t start;
 };
 
 /* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */
@@ -58,8 +58,8 @@ struct floppy_struct {
 #define MAJOR(dev) (unsigned int)((((dev_t)(dev) >> 8) & 0xfff) | ((unsigned int) ((dev_t)(dev) >> 32) & ~0xfff))
 #define MINOR(dev) (unsigned int)(((dev_t)(dev) & 0xff) | ((unsigned int) ((dev_t)(dev) >> 12) & ~0xff))
 #define MKDEV(major,minor) (((minor & 0xff) | ((major & 0xfff) << 8) \
-         | (((unsigned long long int) (minor & ~0xff)) << 12) \
-         | (((unsigned long long int) (major & ~0xfff)) << 32)))
+         | (((uint64_t) (minor & ~0xff)) << 12) \
+         | (((uint64_t) (major & ~0xfff)) << 32)))
 #else
 #include <sys/sysmacros.h>
 #ifdef major
index 4cc4694e2c1b7752d46063c2d3dc8c53f36776b4..a7db8032dce4bb0f6ebd951dd4ef4a4aa2212356 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2007 John Coffman
- * Copyright 2009-2014 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -193,11 +193,12 @@ extern int has_partitions_beta(dev_t dev);        /* defined in geometry.c */
                                "l=%d, ll=%d, f=%d, d=%d, ld=%d\n",
                        MAX_IMAGES, (int)sizeof(char),
                        (int)sizeof(short), (int)sizeof(int),
-                       (int)sizeof(long), (int)sizeof(
+                       (int)sizeof(int32_t), (int)sizeof(
 #if !__MSDOS__
-                       long
+                       int64_t),
+#else
+                       int32_t),
 #endif /* !__MSDOS__ */
-                            long),
                        (int)sizeof(float), (int)sizeof(double),
                        (int)sizeof(long double)
                        );
@@ -719,7 +720,7 @@ fprintf(errstd,"argc=%d, *argv=%s, ch=%c param=%s\n", argc, *argv, ch, param);
                if (*(param = (*argv)+2)) argc++;
                else if (argc) param = *++argv;
                else reboot_arg = "";
-               
+
                while (argc) {
                        if (!reboot_arg)
                            *(reboot_arg = alloc(strlen(param)+1)) = 0;
@@ -731,9 +732,6 @@ fprintf(errstd,"argc=%d, *argv=%s, ch=%c param=%s\n", argc, *argv, ch, param);
                        strcat(reboot_arg, param);
                        argc--;
                    }
-#if 0
-fprintf(errstd,"REBOOT=\"%s\"\n", reboot_arg);             
-#endif
                break;
 #if !__MSDOS__
            case 's':
@@ -767,7 +765,7 @@ fprintf(errstd,"REBOOT=\"%s\"\n", reboot_arg);
                    param = *++argv;
                    argc--;
                }
-               if (param) 
+               if (param)
                    verbose = to_number(param);
                else
                    if (verbose<0) verbose = 1;
@@ -829,18 +827,15 @@ fprintf(errstd,"REBOOT=\"%s\"\n", reboot_arg);
         }
         printf("  * Copyright (C) 1992-1998 Werner Almesberger  (until v20)\n"
                "  * Copyright (C) 1999-2007 John Coffman  (until v22)\n"
-               "  * Copyright (C) 2009-2014 Joachim Wiedorn  (since v23)\n"
+               "  * Copyright (C) 2009-2015 Joachim Wiedorn  (since v23)\n"
                "This program comes with ABSOLUTELY NO WARRANTY. This is free software \n"
                "distributed under the BSD License (3-clause). Details can be found in \n"
                "the file COPYING, which is distributed with this software.\n"
         );
         if (verbose>0) {
 #if !__MSDOS__
-#include <sys/utsname.h>
+  #include <sys/utsname.h>
           struct utsname buf;
-#endif
-          printf("Compiled at %s on %s%s\n", __TIME__, __DATE__, semi);
-#if !__MSDOS__
           if (verbose>=2 && uname(&buf)==0) {
             printf("Running %s kernel %s on %s\n",
               buf.sysname, buf.release, buf.machine);
index 102769c03c8573c03b49884d2098f9292dcff2de..e3d6e93172be65512ed7abb4762474733d017d9e 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2006 John Coffman
- * Copyright 2009-2014 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -19,7 +19,7 @@
 #if !__MSDOS__
 #define INT4 int
 #else
-#define INT4 long
+#define INT4 int32_t
 #endif /* !__MSDOS__ */
 
 /* This is the stuff to check the configuration:
index 15902cfb77f8db994f6eb5c2bc12ac60c4f91f3b..984c01f41cde5ecbcdada58b0929de92cce728ca 100644 (file)
--- a/src/mbr.S
+++ b/src/mbr.S
@@ -1,7 +1,7 @@
 ;  mbr.S  -  Master Boot Record to boot first partition marked active
 ;
 ;  Copyright 2002-2004 John Coffman
-;  Copyright 2009-2011 Joachim Wiedorn
+;  Copyright 2009-2015 Joachim Wiedorn
 ;  All rights reserved.
 ;
 ;  Licensed under the terms contained in the file 'COPYING'
@@ -53,7 +53,7 @@ _main:        cli                     ! NT 4 blows up if this is missing
 #if EXT_PART
 stage: .byte   STAGE_MBR2      ! search extended partitions, too
 #else
-stage: .byte   STAGE_MBR       ! search primary parition only
+stage: .byte   STAGE_MBR       ! search primary partition only
 #endif
 
        .org    PARTS_LOAD+6
index 329a90f8bb31ea7ecb11804fac1ac32c0cc818f3..dcd6dedd49bc78776f8da4336de0830f68ec6aad 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2005 John Coffman
- * Copyright 2009-2014 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -575,7 +575,7 @@ void do_activate(char *part, char *which)
 #if 1
     int part_max, count, number, fd;
     struct partition pt [PART_MAX_MAX+1];
-    long long daddr [PART_MAX_MAX+1];
+    int64_t daddr [PART_MAX_MAX+1];
     int modify=0;
     
     part_max = read_partitions(part, extended_pt ? PART_MAX_MAX : 0,
@@ -683,7 +683,7 @@ void do_install_mbr(char *part, char *what)
     if (fstat(fd,&st) < 0) die("stat: %s : %s", part,strerror(errno));
     if (!S_ISBLK(st.st_mode) && !force_fs) die("%s not a block device",part);
     if (st.st_rdev != (st.st_rdev & has_partitions(st.st_rdev)))
-       die("%s is not a master device with a primary parition table",part);
+       die("%s is not a master device with a primary partition table",part);
     if (read(fd,&buf,SECTOR_SIZE) != SECTOR_SIZE) die("read %s: %s",part, strerror(errno));
 
     cp = cfg_get_strg(cf_options,"force-backup");
@@ -740,7 +740,7 @@ void do_install_mbr(char *part, char *what)
 
 /* partition table read */
 int read_partitions(char *part, int max, int *volid,
-               struct partition *p, long long *where)
+               struct partition *p, int64_t *where)
 {
     int fd, i;
     unsigned int second, base;
@@ -748,7 +748,7 @@ int read_partitions(char *part, int max, int *volid,
     struct partition pt[PART_MAX];
     BOOT_PARAMS_1 hdr;
     struct stat st;
-    long long daddr;
+    int64_t daddr;
 
     if ((fd=open(part,O_RDONLY))<0) die("Cannot open '%s'", part);
     if (fstat(fd,&st)<0) die("Cannot fstat '%s'", part);
index e3c2fa3f9fbb764b9bd584914bf44295a4d21380..c84a54028fd39318cb9e927483d3b0baf9b8376a 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2004 John Coffman
- * Copyright 2009-2011 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -26,10 +26,10 @@ enum {PTW_OKAY=0, PTW_DOS=1, PTW_OS2=2, PTW_SWAP, PTW_XFS,
                PTW_mask=7, PTW_NTFS=8};
 
 
-#define LLSECTORSIZE ((long long)SECTOR_SIZE)
+#define LLSECTORSIZE ((int64_t)SECTOR_SIZE)
 
 #if __GLIBC__ < 2 || __GLIBC_MINOR__ < 1
-typedef long long lloff_t;
+typedef int64_t lloff_t;
 
 #ifdef _syscall5
        lloff_t lseek64(unsigned int fd, lloff_t offs, unsigned int whence);
@@ -80,7 +80,7 @@ void do_install_mbr(char *where, char *what);
 /* Install a new MBR (Master Boot Record) */
 
 int read_partitions(char *part, int max, int *volid,
-               struct partition *p, long long *where);
+               struct partition *p, int64_t *where);
 /* read all partitions & partition tables */
 
 #endif
index 44572633381fa9345db30f5f19530cc139afd7d4..a4f1f313f0c8cd22ffe53248aac3cd409b62c0ae 100644 (file)
@@ -1,7 +1,7 @@
 /* probe.c  -  BIOS probe utility
  * 
  * Copyright 1999-2006 John Coffman
- * Copyright 2009-2013 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -675,7 +675,7 @@ static void do_table(char *part)
 {
     struct partition pt [PART_MAX_MAX+1];
     int volid;
-    long long where[PART_MAX_MAX+1];
+    int64_t where[PART_MAX_MAX+1];
     int i,j;
     int extd = (extended_pt || verbose>0);
     
@@ -693,7 +693,7 @@ static void do_table(char *part)
     }
     if (verbose>=5) {
        printf("\n");
-       for (i=0; i<j; i++) printf("%4d%20lld%12d\n", i+1, where[i], (int)(where[i]/SECTOR_SIZE));
+       for (i=0; i<j; i++) printf("%4d%20" PRId64 "%12d\n", i+1, where[i], (int)(where[i]/SECTOR_SIZE));
     }
 }
 
@@ -999,8 +999,8 @@ int bios_device(GEOMETRY *geo, int device)
     while (--bios >= 0x80) {
        get_geom(bios, &bdata);
        if (verbose>=5) {
-               printf("bios_dev: (0x%02X)  vol-ID=%08X  *PT=%08lX\n",
-                       bios, bdata.serial_no, (long)bdata.pt);
+               printf("bios_dev: (0x%02X)  vol-ID=%08X  *PT=%0*" PRIXPTR "\n",
+                       bios, bdata.serial_no, PTR_WIDTH, (intptr_t)bdata.pt);
 #ifdef DEBUG_PROBE
                dump_pt((void*)bdata.pt);
 #endif
index 1b86d99e5a8eeab053b2dd89bbe980b2012e81ef..edd5f8d61e88b78aa4f6400475b4cd354de73bca 100644 (file)
@@ -1,7 +1,7 @@
 /* probe.h  -  BIOS probe utility
  * 
  * Copyright 1999-2005 John Coffman
- * Copyright 2009-2011 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -34,7 +34,7 @@ struct disk_param {
    unsigned int n_cyl;
    unsigned int n_head;
    unsigned int n_sect;
-   long long n_sectors;
+   int64_t n_sectors;
    short n_byte;
    unsigned int edd_config_ptr;
 };
@@ -210,7 +210,7 @@ struct Edd {
    unsigned int  cylinders;
    unsigned int  heads;
    unsigned int  sectors;
-   long long      total_sectors;
+   int64_t        total_sectors;
    unsigned short sector_size;
 
    unsigned short offset,
index 5b20c2fcccea6cdc6beb527952162f96149779f5..4674f3fff5d82e311201c8a5861f59201fdd1b92 100644 (file)
@@ -125,7 +125,7 @@ static void shsTransform(void)
 /*  Step A.  Copy the data buffer into the work buffer */
 /*  done  */
 #if SHS_DEBUG>=1
-   for (i=0; i<16; i++)  printf("W[%d] = %08lX\n", i, W[i]);
+   for (i=0; i<16; i++)  printf("W[%d] = %08" PRIX32 "\n", i, W[i]);
 #endif
 
 /*  Step B.  Expand the 16 words into 64 temporary data words */
index a4889098dce76c59d0888e763a4dc6579b12dd28..eef80b1d7a7e17664096e94e9b4eda304db91934 100644 (file)
@@ -1,7 +1,7 @@
 /* version.h
  * 
  * Copyright 2005-2007 John Coffman
- * Copyright 2009-2014 Joachim Wiedorn
+ * Copyright 2009-2015 Joachim Wiedorn
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -12,8 +12,8 @@
 #define VERSION_H
 
 #define VERSION_MAJOR 24
-#define VERSION_MINOR 1
+#define VERSION_MINOR 2
 #define VERSION_EDIT  ""
-#define VERSION_DATE "17-October-2014"
+#define VERSION_DATE "22-November-2015"
 
 #endif