quota, repquota i szerokość kolumn...
romke
romke at estrefa.pl
Thu Dec 30 17:47:09 CET 2004
Witam, posiadam w systemie kilka kont z quotą nie mieszczącą się w 7
znakowym formacie (%7s), i tak repquota -a generuje brzydko wyglądające:
nobody -- 0 0 0 7 0 0
romke -- 10050192 15360000 15360000 46250 0 0
krzysiek -- 3351176 5120000 5120000 11463 0 0
poprawiłem więc format na %8s oraz formatowanie nagłówków i teraz
wygląda to tak:
nobody -- 0 0 0 7 0 0
romke -- 10054712 15360000 15360000 46250 0 0
krzysiek -- 3351176 5120000 5120000 11463 0 0
moim skromnym zdaniem dyski rosną i może się trafiać coraz więcej
takich przypadków, przesyłam stosowne diffy w załącznikach:
1. quota-repquota-len-fix.patch -- poprawa długości pól
2. quota-pl.po-update.patch.patch -- patch do patcha:
http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/quota-pl.po-update.patch
pozdrawiam
--
romke Roman Barczyński ~~~~ tel. +48 12 632 7365 ~~~~ www.romke.info
____________________________________________ JID/email: romke at estrefa.pl
-------------- next part --------------
diff -ruN quota-tools-romke/repquota.c quota-tools/repquota.c
--- quota-tools-romke/repquota.c 2004-12-30 15:08:45.000000000 +0100
+++ quota-tools/repquota.c 2003-02-14 18:26:40.000000000 +0100
@@ -151,7 +151,7 @@
space2str(toqb(entry->dqb_curspace), numbuf[0], flags & FL_SHORTNUMS);
space2str(entry->dqb_bsoftlimit, numbuf[1], flags & FL_SHORTNUMS);
space2str(entry->dqb_bhardlimit, numbuf[2], flags & FL_SHORTNUMS);
- printf("%-*s %c%c %7s %7s %7s %6s", PRINTNAMELEN, pname,
+ printf("%-*s %c%c %8s %8s %8s %6s", PRINTNAMELEN, pname,
overlim(qb2kb(toqb(entry->dqb_curspace)), qb2kb(entry->dqb_bsoftlimit), qb2kb(entry->dqb_bhardlimit)),
overlim(entry->dqb_curinodes, entry->dqb_isoftlimit, entry->dqb_ihardlimit),
numbuf[0], numbuf[1], numbuf[2], time);
@@ -242,9 +242,9 @@
time2str(h->qh_info.dqi_bgrace, bgbuf, TF_ROUND);
time2str(h->qh_info.dqi_igrace, igbuf, TF_ROUND);
printf(_("Block grace time: %s; Inode grace time: %s\n"), bgbuf, igbuf);
- printf(_(" Block limits File limits\n"));
- printf(_("%-9s used soft hard grace used soft hard grace\n"), (type == USRQUOTA)?_("User"):_("Group"));
- printf("----------------------------------------------------------------------\n");
+ printf(_(" Block limits File limits\n"));
+ printf(_("%-9s used soft hard grace used soft hard grace\n"), (type == USRQUOTA)?_("User"):_("Group"));
+ printf("-------------------------------------------------------------------------\n");
if (h->qh_ops->scan_dquots(h, output) < 0)
return;
-------------- next part --------------
2c2
< +++ quota-tools/po/pl.po 2004-06-19 20:50:19.622127400 +0200
---
> +++ quota-tools/po/pl.po 2004-12-30 17:02:18.000000000 +0100
1269a1270,1286
> @@ -1703,13 +1737,13 @@
>
> #: repquota.c:245
> #, c-format
> -msgid " Block limits File limits\n"
> +msgid " Block limits File limits\n"
> msgstr " Limity bloków Limity plików\n"
>
> #: repquota.c:246
> #, c-format
> -msgid "%-9s used soft hard grace used soft hard grace\n"
> -msgstr "%-9s używ. mięk. twar. pobł. używ. mięk. twar. pobł.\n"
> +msgid "%-9s used soft hard grace used soft hard grace\n"
> +msgstr "%-10s używ. mięk. twar. pobł. używ. mięk. twar. pobł.\n"
>
> #: repquota.c:246
> msgid "User"
More information about the pld-devel-pl
mailing list