bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Command to check if a partition is active


From: Thomas Rohwer
Subject: Command to check if a partition is active
Date: Tue, 25 Dec 2001 20:23:39 +0100

I implemented a command to check, if the saved partition has the active flag 
set.
This is useful for automatically booting a hibernate partition.

The code for the command was obtained from the command makeactive. It checks, 
if the
active flag is set, and does nothing in that case. Otherwise, it returns a 
nonzero
value to stop the running script.

I noticed, that the procedure run_script does not evaluate the return value of 
the command.
For example pressing the escape key for the pause command does not stop the 
current script.
I changed this in my version, so that a non-zero return value stop the 
excecuting script.
A different approach could be to designate an error code,
that does not lead to a displayed error message.

If there is interest in a patch, I can send a diff versus release 0.90.


Thomas Rohwer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]