Magellan Linux

Log of /tags/grubby-8_21/grubby.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 2062 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 20 14:30:04 2013 UTC (11 years, 1 month ago) by niro
File length: 118283 byte(s)
Diff to previous 2058
tagged 'grubby-8_21'

Revision 2058 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 20 14:06:30 2013 UTC (11 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 118283 byte(s)
Diff to previous 2056
Spelling fixes.

Revision 2056 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 20 14:04:28 2013 UTC (11 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 118284 byte(s)
Diff to previous 2052
Deal with case-insensitive extlinux config file

Revision 2052 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 20 14:00:54 2013 UTC (11 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 118110 byte(s)
Diff to previous 1940
Fix removals and initrd additions for LT_KERNEL_EFI type entries.

Revision 1940 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 1 12:39:50 2012 UTC (11 years, 5 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 117998 byte(s)
Diff to previous 1934
Don't accidentally migrate from linuxefi back to linux (#859285)

Revision 1934 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 1 12:08:46 2012 UTC (11 years, 5 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 116684 byte(s)
Diff to previous 1931
Fix broken alloca()/free() pair.

Revision 1931 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 1 12:06:26 2012 UTC (11 years, 5 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 116707 byte(s)
Diff to previous 1868
Handle linuxefi and initrdefi lines correctly in grub2.

Revision 1868 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:22:30 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 116616 byte(s)
Diff to previous 1866
Fix minor memory leak introduced by previous fix.

Revision 1866 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:21:25 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 116578 byte(s)
Diff to previous 1864
Revert "Avoid string duplication calling dirname()"

Revision 1864 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:20:31 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 116569 byte(s)
Diff to previous 1859
Fix uninitialized variable error.

Revision 1859 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:15:20 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 116569 byte(s)
Diff to previous 1855
Add --set-default-index feature

Revision 1855 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:13:03 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 115969 byte(s)
Diff to previous 1854
Fix minor style issue.

Revision 1854 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:12:32 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 115977 byte(s)
Diff to previous 1853
ia64/elilo: add support for probing the currently installed bootloader

Revision 1853 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:12:07 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 115528 byte(s)
Diff to previous 1852
ppc64/yaboot: add support for probing the currently installed bootloader

Revision 1852 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:11:38 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 114608 byte(s)
Diff to previous 1851
Fix grub detection on SuSE systems: config file order

Revision 1851 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:09:47 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 114608 byte(s)
Diff to previous 1850
Invert "isSuseSystem()" test so the suse code is nearer the test.

Revision 1850 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:09:12 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 114612 byte(s)
Diff to previous 1849
Fix for grub on SuSE systems: lba and boot information

Revision 1849 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:08:29 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 108067 byte(s)
Diff to previous 1846
Support systems that do not have /boot as a separate filesystem

Revision 1846 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 13:00:11 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 107849 byte(s)
Diff to previous 1845
Convert to c99 loop initializations.

Revision 1845 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 12:59:39 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 107907 byte(s)
Diff to previous 1844
Avoid string duplication calling dirname()

Revision 1844 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 12:59:07 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 107916 byte(s)
Diff to previous 1841
Add "const" specifier to function arguments

Revision 1841 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 12:49:27 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 107853 byte(s)
Diff to previous 1840
Pick the last / device (#826537)

Revision 1840 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 12:48:49 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 107827 byte(s)
Diff to previous 1837
Preserve "trailing indentation" when splitting line elements (#742720)

Revision 1837 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 2 12:46:11 2012 UTC (11 years, 8 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 107877 byte(s)
Diff to previous 1802
Fix failures with grub 2.00~beta2 and 8.10, and add a test case.

Revision 1802 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 16 17:49:04 2012 UTC (11 years, 11 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 107877 byte(s)
Diff to previous 1801
Try to find grub2 config first

Revision 1801 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 16 17:48:10 2012 UTC (11 years, 11 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 107857 byte(s)
Diff to previous 1800
Make --remove-kenrel support titles in grub2 (and other fixes)

Revision 1800 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 16 17:46:40 2012 UTC (11 years, 11 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 105046 byte(s)
Diff to previous 1751
Use "isquote" where appropriate.

Revision 1751 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 01:10:10 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 105142 byte(s)
Diff to previous 1750
Try to display title when printing information with '--info'

Signed-off-by: Cleber Rosa <crosa@redhat.com>



Revision 1750 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 01:09:51 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 104863 byte(s)
Diff to previous 1748
Fix endswith() to correctly test its input for validity.



Revision 1748 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 01:07:15 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 104863 byte(s)
Diff to previous 1747
Implement support for "default saved" for grub2

Signed-off-by: Cleber Rosa <crosa@redhat.com>



Revision 1747 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 01:06:48 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 104462 byte(s)
Diff to previous 1746
Include prefix when printing kernel information

When running grubby with '--info=', the initrd is displayed with the
boot prefix, so, for correctness, also include it in the kernel line.

Signed-off-by: Cleber Rosa <crosa@redhat.com>



Revision 1746 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 01:06:20 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 104452 byte(s)
Diff to previous 1745
Refactor grub2 title extraction, making it a function

'--default-title' now uses that functions, but others such as '--info'
could, IMHO, also display the title and thus, use the refactored
function.

Signed-off-by: Cleber Rosa <crosa@redhat.com>



Revision 1745 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 01:05:52 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 102856 byte(s)
Diff to previous 1736
Include a / when one is missing in paths (#769641)



Revision 1736 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 01:02:17 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 102496 byte(s)
Diff to previous 1727
grubby: Add --debug option to annotate "suitable template" failures

Today, when grubby fails with "no suitable template found" the user
has no idea why that might be.  These can fail for several reasons.
So add a --debug option to print out the line in grubby.c where it
failed, a text message describing the failure, and a copy of the
bootloader entry that failed, to aid investigation.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>



Revision 1727 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:57:49 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 100892 byte(s)
Diff to previous 1722
Use dummy entries for text following kernel entries so it is preserved 
(#744717)

Signed-off-by: Adam Williamson <awilliam@redhat.com>



Revision 1722 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:53:14 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 100861 byte(s)
Diff to previous 1721
Update "echo 'Loading..." messages to the new kernel version

grub2-mkconfig will create lines like:
		echo    'Loading Linux 3.1.0-0.rc6.git0.0.fc16.x86_64 
...'
- depending on the content of /etc/default/grub.

grubby would recognize these lines and replace them with lines with the 
right
version number such as:
	echo 'Loading Fedora (3.1.0-0.rc6.git0.0.fc16.x86_64)'

these lines were however not recognized by grubby and would not be 
updated on
next kernel update when this entry would be used as template.

With this patch grubby will no longer look for a specific title but 
patch any
"echo 'Loading" line immediately before the kernel line.

Signed-off-by: Adam Williamson <awilliam@redhat.com>



Revision 1721 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:52:28 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 100790 byte(s)
Diff to previous 1720
Add new '--default-title' feature.

This displays the title of the default entry directly from the
parsed configuration file.

Signed-off-by: Cleber Rosa <crosa@redhat.com>




Revision 1720 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:51:28 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 99504 byte(s)
Diff to previous 1718
Add new '--default-index' feature.

This displays the (numeric) index of the default entry directly
from the parsed configuration file.

Signed-off-by: Cleber Rosa <crosa@redhat.com>




Revision 1718 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:49:41 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 99184 byte(s)
Diff to previous 1717
GRUB: Fix detection by increasing offset when comparing stage1 to MBR

A couple of instructions of grub's stage1 get modified when copied to 
the
MBR (replaced by NOOPs). Check for this condition, and skip these bytes
while compare stage1 and MBR.

Signed-off-by: Cleber Rosa <crosa@redhat.com>



Revision 1717 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:47:17 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 98722 byte(s)
Diff to previous 1715
    Don't crash if grubConfig not found.
    
    I trigger this crash on my system. It has syslinux and no grub.
    
    Signed-off-by: Christopher Li <kernel@chrisli.org>



Revision 1715 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:35:46 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 98708 byte(s)
Diff to previous 1714
    Look for other possible grub config files
    
    Since debian and Ubuntu don't symlink /boot/grub/menu.lst
    to /etc/grub.conf, make it possible to look them over on
    this original location as well.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>



Revision 1714 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:32:14 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 98209 byte(s)
Diff to previous 1696
    Make grubby to recognize Ubuntu's spin of Grub2
    
    We are looking to use grubby as a bootloader entries
    manager for the autotest project:
    
    http://autotest.kernel.org/
    
    The project aims to cover more distros than just
    red hat based ones, so this small patch fixes the
    tool under Ubuntu. They have chosen to name grub2
    grub, in all directory references. Also, they don't
    make symlinks of grub config files on /etc. So,
    adapt the code to take into consideration this
    behavior.
    
    Changes from v1:
      * Removed nested set of {}
      * Made the return in case /etc/grub.d is found
        indented
      * Moved the dbgPrint("not found\n") statement
        before the last return. Also, put a new
        dbgPrint("found\n") if we've found a suitable
        grub2 config file ubuntu/debian style.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>



Revision 1696 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 17 23:46:24 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 97866 byte(s)
Diff to previous 1694
Add grub2.cfg support to grubby.



Revision 1694 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 17 23:23:07 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 88534 byte(s)
Diff to previous 1693
Tweak some make options.

Some functions are only used in dbgPrintf() arguments. As such,
errors/warnings on unused functions need to be disabled.

Also, use -std=gnu99.

Also, add a debug target.



Revision 1693 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 17 23:21:08 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 88513 byte(s)
Diff to previous 1692
Rename entrySeparator to entryStart.
    
Since we're actually using it to detect the start of an entry (and
specifically not the end), name this slightly better.



Revision 1692 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 17 23:14:54 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 88565 byte(s)
Diff to previous 1332
Convert configFileInfo structs to C99-style initializers.

Get rid of the old initializers where struct names were commends, in
favor of C99-style assignment, so new fields can be put at logical
places without having to change the whole file.



Revision 1332 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 3 20:32:19 2011 UTC (12 years, 9 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 91953 byte(s)
Copied from: trunk/mkinitrd-magellan/grubby/grubby.c revision 1304
Diff to previous 1304
-forkin standalone grubby

Revision 1304 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 27 16:19:11 2011 UTC (12 years, 10 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 91953 byte(s)
Diff to previous 1177
merged with 7.0.16: upstream commit:  http://git.fedorahosted.org/git?p=grubby.git;a=commit;h=703a5b7353fc34df4401bba226736176e1c62b7e
When passing --update-kernel=ALL the --args should apply to all kernel entries, not just the first one.

Revision 1177 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 15 21:16:32 2010 UTC (13 years, 3 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 92155 byte(s)
Diff to previous 1156
-added check for return value of getuuidbydev() - resolves a segfault if the device does not exist - see rhbz#592294

Revision 1156 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 14 19:47:52 2010 UTC (13 years, 6 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 92052 byte(s)
Diff to previous 926
-merged with upstream:
-update initrd support
-better rootdev handling
-better support for uuids

Revision 926 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 28 13:29:38 2009 UTC (14 years, 5 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 89031 byte(s)
Diff to previous 920
-read grub options from /etc/conf.d/grub

Revision 920 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 28 09:50:42 2009 UTC (14 years, 5 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 89037 byte(s)
Diff to previous 914
-fixed grub.conf default location

Revision 914 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 28 00:16:16 2009 UTC (14 years, 5 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 89031 byte(s)
Diff to previous 532
-updated grubby to version 7.0.8 from fedory with blkid support

Revision 532 - (view) (download) (annotate) - [select for diffs]
Added Sat Sep 1 22:45:15 2007 UTC (16 years, 6 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 76002 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a