* [PATCH] [swsusp] print error message when swapping is disabled (fwd)
@ 2004-10-26 2:01 Zhu, Yi
2004-10-26 2:38 ` Chris Wedgwood
0 siblings, 1 reply; 4+ messages in thread
From: Zhu, Yi @ 2004-10-26 2:01 UTC (permalink / raw)
To: Andrew Morton; +Cc: Pavel Machek, Linux Kernel Mailing List
Hi Andrew,
This patch gives some clues to the user when swapping is not enabled during
swsusp. Please apply.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
--- linux-2.6.9-orig/kernel/power/swsusp.c 2004-10-24 16:16:41.000000000 +0800
+++ linux-2.6.9/kernel/power/swsusp.c 2004-10-24 16:15:06.000000000 +0800
@@ -843,8 +843,11 @@ asmlinkage int swsusp_save(void)
{
int error = 0;
- if ((error = swsusp_swap_check()))
+ if ((error = swsusp_swap_check())) {
+ printk(KERN_ERR "swsusp: FATAL: cannot find swap device, try "
+ "swapon -a!\n");
return error;
+ }
return suspend_prepare_image();
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [swsusp] print error message when swapping is disabled (fwd)
2004-10-26 2:01 [PATCH] [swsusp] print error message when swapping is disabled (fwd) Zhu, Yi
@ 2004-10-26 2:38 ` Chris Wedgwood
2004-10-26 9:14 ` Pavel Machek
0 siblings, 1 reply; 4+ messages in thread
From: Chris Wedgwood @ 2004-10-26 2:38 UTC (permalink / raw)
To: Zhu, Yi; +Cc: Andrew Morton, Pavel Machek, Linux Kernel Mailing List
> + if ((error = swsusp_swap_check())) {
> + printk(KERN_ERR "swsusp: FATAL: cannot find swap device, try "
> + "swapon -a!\n");
maybe it's just me, but i would really prefer to have the occasional
long(er) line that splitting strings like that
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [swsusp] print error message when swapping is disabled (fwd)
2004-10-26 2:38 ` Chris Wedgwood
@ 2004-10-26 9:14 ` Pavel Machek
2004-10-26 9:16 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2004-10-26 9:14 UTC (permalink / raw)
To: Chris Wedgwood; +Cc: Zhu, Yi, Andrew Morton, Linux Kernel Mailing List
Hi!
> > + if ((error = swsusp_swap_check())) {
> > + printk(KERN_ERR "swsusp: FATAL: cannot find swap device, try "
> > + "swapon -a!\n");
>
> maybe it's just me, but i would really prefer to have the occasional
> long(er) line that splitting strings like that
It is not just you :-). Also it should probably not have KERN_ERR
level (it is not really error, you just asked for something that can
not be done) and word FATAL scares me.
But it is probably easier to put there some message first then fix it
up.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [swsusp] print error message when swapping is disabled (fwd)
2004-10-26 9:14 ` Pavel Machek
@ 2004-10-26 9:16 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2004-10-26 9:16 UTC (permalink / raw)
To: Pavel Machek; +Cc: cw, yi.zhu, linux-kernel
Pavel Machek <pavel@ucw.cz> wrote:
>
> > > + if ((error = swsusp_swap_check())) {
> > > + printk(KERN_ERR "swsusp: FATAL: cannot find swap device, try "
> > > + "swapon -a!\n");
> >
> > maybe it's just me, but i would really prefer to have the occasional
> > long(er) line that splitting strings like that
>
> It is not just you :-).
Try looking at that long line in an 80-col xterm. It looks worse than it
does with the manual break.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-10-26 9:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-26 2:01 [PATCH] [swsusp] print error message when swapping is disabled (fwd) Zhu, Yi
2004-10-26 2:38 ` Chris Wedgwood
2004-10-26 9:14 ` Pavel Machek
2004-10-26 9:16 ` Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.