wok view hardinfo/stuff/languages.patch @ rev 3175
reconfigure udev after /etc/udev/rules.d addition
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon May 25 13:26:29 2009 +0200 (2009-05-25) |
parents | |
children | 4de2c7803ae7 |
line source
1 --- arch/common/languages.h 2008-04-26 10:04:42.000000000 +0200
2 +++ arch/common/languages.h 2008-04-26 10:51:31.000000000 +0200
3 @@ -21,6 +21,7 @@
4 {
5 FILE *locale;
6 gchar buf[512], *retval = NULL;
7 + int last = 0;
9 locale = popen("locale -va", "r");
10 if (!locale)
11 @@ -37,7 +38,8 @@
12 *date = NULL,
13 *codeset = NULL;
15 - while (fgets(buf, 512, locale)) {
16 + while (fgets(buf, 512, locale) || last++ == 0) {
17 + if (last) buf[0] = 0;
18 if (!strncmp(buf, "locale:", 7)) {
19 sscanf(buf, "locale: %s", name);
20 fgets(buf, 128, locale);