[parted-devel] Parted on GNU Hurd based systems
Debarshi 'Rishi' Ray
debarshi.ray at gmail.com
Mon Mar 5 16:14:48 CET 2007
I have attached the final version of the patch using 'git diff' on the
'master' branch. I have re-done it after the code reformatting in
parted/ui.c.
Here is what it includes:
a. I have introduced signal handlers for situations where SA_SIGINFO
(that includes no 'sigaction' cases) is unavailable and one has to use
a signal handler with a different signature. While doing this, I have
arranged the new signal handlers in a way so that they are in the same
order in which they appear in the init_ui function.
b. Modified init_ui to consider no SA_SIGINFO cases, where 'signal' is
used instead of 'sigaction'.
Possible issues in the patch:
a. The 8-space indentation requires the messages output by the signal
handlers to be wrapped on to the next line. However as Jim rightly
pointed out in #parted, this makes it difficult to search for the
messages in the code. I have left it as it is since this problem
exists in a number of other files too, and probably has to be solved
as part of the 'coding style' debate. :-)
b. Some minor formatting changes in init_ui.c, which I hope will not
affect the granularity of the patch:
- sig_int.sa_sigaction = &sigint_handler;
- sig_fpe.sa_sigaction = &sigfpe_handler;
- sig_ill.sa_sigaction = &sigill_handler;
+ sig_int.sa_sigaction = &sigint_handler;
+ sig_fpe.sa_sigaction = &sigfpe_handler;
+ sig_ill.sa_sigaction = &sigill_handler;
Of course if you like I can put it separately in another patch.
Comments?
Happy hacking,
Debarshi
--
GPG key ID: 63D4A5A7
Key server: pgp.mit.edu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ui.c.git-diff
Type: application/octet-stream
Size: 9433 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20070305/324b24ad/ui.c.obj
More information about the parted-devel
mailing list