Skip to contentSkip to conversation

util-linux 2.13-pre1

OT Adrian Bunk 3 participants 5 messages Aug 2, 2005 – Aug 9, 2005

lore
Share & tools
lore
#0 lore raw

util-linux 2.13-pre1 is available at
ftp://ftp.kernel.org/pub/linux/utils/util-linux/testing/util-linux-2.13-pre1.tar.gz

Changes:
* use GNU autoconf/automake/libtool for building
* added schedutils
* removed support for curses implementations other than ncurses
* removed programs: arch, passwd, rescuept, setfdprm
* removed mkminix-0.1/
* misc fixes and documentation updates
* new translation: vi
* updated translations: ca, de, fi, fr, it, nl, ru, tr

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#1 lore raw

Adrian,

Quoted 2 lines · Adrian Bunk

util-linux 2.13-pre1 is available at
ftp://ftp.kernel.org/pub/linux/utils/util-linux/testing/util-linux-2.13-pre1.tar.gz

Any comments on the mount patch I sent to you?

Attaching it again now. Please apply.

Thanks,
Daniel

From: Daniel Drake <[email protected]>

Some filesystems such as FAT will default to using the umask of the current process if the user did not specify a umask option.

Currently, mount.c calls umask(022) early on, removing the possibility of the user-specified umask (at shell level) being used by default.

Removing the umask(022) call solves the problem.

This appears safe to do, because the code which creates files already does this safely (saves umask, sets umask 022, creates file, restores umask).

Please apply.

mount/mount.c renamed from mount/mount.c.orig +0 -2
@@ -1466,8 +1466,6 @@ main(int argc, char *argv[]) {
 	if ((p = strrchr(progname, '/')) != NULL)
 		progname = p+1;
 
-	umask(022);
-
 	/* People report that a mount called from init without console
 	   writes error messages to /etc/mtab
 	   Let us try to avoid getting fd's 0,1,2 */
#3 lore raw
In reply to Adrian Bunk
Quoted 2 lines · Adrian Bunk

util-linux 2.13-pre1 is available at
ftp://ftp.kernel.org/pub/linux/utils/util-linux/testing/util-linux-2.13-pre1.tar.gz

You missed my fixes to cal to fix a possible crash bug for certain terminal types, and to fix date alignment issues for certain dates. I've rediffed the attached patched against 2.13-pre1.

Also schedutils build is breaking on redhat 9.
This really is messy but should be handled.
http://mail.linux.ie/pipermail/ilug/2004-November/019784.html
API changes in same minor version of glibc should just not happen.

Signature · 2 lines
Pa'draig Brady - http://www.pixelbeat.org
--
cal-pb.c renamed from cal.c +33 -7
@@ -87,9 +87,13 @@
      putp(s);
 }
 
-static char *
+static const char *
 my_tgetstr(char *s, char *ss) {
-     return tigetstr(ss);
+     const char* ret = tigetstr(ss);
+     if (!ret || ret==(char*)-1)
+         return "";
+     else
+         return ret;
 }
 
 #elif defined(HAVE_LIBTERMCAP)
@@ -110,9 +114,13 @@
      tputs (s, 1, putchar);
 }
 
-static char *
+static const char *
 my_tgetstr(char *s, char *ss) {
-     return tgetstr(s, &strbuf);
+     const char* ret = tgetstr(s, &strbuf);
+     if (!ret)
+         return "";
+     else
+         return ret;
 }
 
 #endif
@@ -225,6 +233,7 @@
 char * ascii_day(char *, int);
 void center_str(const char* src, char* dest, size_t dest_size, int width);
 void center(const char *, int, int);
+int strlen_terminal(const char* s);
 void day_array(int, int, int, int *);
 int day_in_week(int, int, int);
 int day_in_year(int, int, int);
@@ -498,10 +507,18 @@
 	for (i = 0; i < 2; i++)
 		printf("%s  %s  %s\n", out_prev.s[i], out_curm.s[i], out_next.s[i]);
 	for (i = 2; i < FMT_ST_LINES; i++) {
+		int width1,width2,width3;
+		width1=width2=width3=width;
+#if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP)
+		/* adjust width to allow for non printable characters */
+		width1+=strlen(out_prev.s[i])-strlen_terminal(out_prev.s[i]);
+		width2+=strlen(out_curm.s[i])-strlen_terminal(out_curm.s[i]);
+		width3+=strlen(out_next.s[i])-strlen_terminal(out_next.s[i]);
+#endif
 		snprintf(lineout, SIZE(lineout), "%-*s  %-*s  %-*s\n",
-		       width, out_prev.s[i],
-		       width, out_curm.s[i],
-		       width, out_next.s[i]);
+		       width1, out_prev.s[i],
+		       width2, out_curm.s[i],
+		       width3, out_next.s[i]);
 #if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP)
 		my_putstring(lineout);
 #else
@@ -773,6 +790,15 @@
 		(void)printf("%*s", separate, "");
 }
 
+int
+strlen_terminal(const char* s)
+{
+	if (Senter && Senter[0])
+		if (strstr(s,Senter))
+			return strlen(s) - strlen(Senter) - strlen(Sexit);
+	return strlen(s);
+}
+
 void
 usage()
 {
#4 lore raw
Quoted 8 lines · On Tue, Aug 09, 2005 at 12:46:58PM +0100, [email protected] wrote:
Quoted 2 lines · Adrian Bunk

util-linux 2.13-pre1 is available at
ftp://ftp.kernel.org/pub/linux/utils/util-linux/testing/util-linux-2.13-pre1.tar.gz

You missed my fixes to cal to fix a possible crash bug for certain terminal types, and to fix date alignment issues for certain dates. I've rediffed the attached patched against 2.13-pre1.

Yes sorry, this patch is still part of the big batch of util-linux emails I have to go through.

Quoted 4 lines

Also schedutils build is breaking on redhat 9.
This really is messy but should be handled.
http://mail.linux.ie/pipermail/ilug/2004-November/019784.html
API changes in same minor version of glibc should just not happen.

The URL seems to be invalid, but I know what you are talking about, and a fix is already on my TODO list to be implemented before the final 2.13 release.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#2 lore raw
In reply to Daniel Drake
Quoted 1 line · Daniel Drake

Adrian,

Hi Daniel,

Quoted 6 lines
Quoted 2 lines · Adrian Bunk

util-linux 2.13-pre1 is available at
ftp://ftp.kernel.org/pub/linux/utils/util-linux/testing/util-linux-2.13-pre1.tar.gz

Any comments on the mount patch I sent to you?
...

sorry, this patch is still part of the big batch of util-linux emails I have to go through.

Quoted 2 lines

Thanks,
Daniel

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed