lkml.org 
[lkml]   [2004]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Quota warnings somewhat broken
  Hello,

> When a user exceeds his soft (and hard) disk quota, a warning message is
> printed to current->tty. However, output is a bit offset:
>
> $ dd if=/dev/zero of=blk bs=1024 count=100000
> hda1: write failed, user block limit reached.
> dd: opening `blk': Disk quota exceeded
>
> This is due to the messages in fs/dquot.c only ending in "\n" but should
> probably end in "\r\n".
Thanks for notifying. It looks like a good idea. Attached patch should apply
well to 2.6.9. Linus, please apply.

Honza

Fix end of lines in quota messages.
Signed-off-by: Jan Kara

diff -ru linux-2.6.8.1/fs/dquot.c linux-2.6.8.1-messfix/fs/dquot.c
--- linux-2.6.8.1/fs/dquot.c 2004-10-19 12:07:08.000000000 +0200
+++ linux-2.6.8.1-messfix/fs/dquot.c 2004-10-22 11:28:26.678037906 +0200
@@ -811,22 +811,22 @@
tty_write_message(current->signal->tty, quotatypes[dquot->dq_type]);
switch (warntype) {
case IHARDWARN:
- msg = " file limit reached.\n";
+ msg = " file limit reached.\r\n";
break;
case ISOFTLONGWARN:
- msg = " file quota exceeded too long.\n";
+ msg = " file quota exceeded too long.\r\n";
break;
case ISOFTWARN:
- msg = " file quota exceeded.\n";
+ msg = " file quota exceeded.\r\n";
break;
case BHARDWARN:
- msg = " block limit reached.\n";
+ msg = " block limit reached.\r\n";
break;
case BSOFTLONGWARN:
- msg = " block quota exceeded too long.\n";
+ msg = " block quota exceeded too long.\r\n";
break;
case BSOFTWARN:
- msg = " block quota exceeded.\n";
+ msg = " block quota exceeded.\r\n";
break;
}
tty_write_message(current->signal->tty, msg);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.066 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site