Your message dated Sat, 01 Apr 2017 15:49:57 +0000
with message-id <e1culhp-0004ud...@fasolo.debian.org>
and subject line Bug#511645: fixed in xtrs 4.9c-4
has caused the Debian Bug report #511645,
regarding xtrs: hangs on startup due to use of SIGIO
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
511645: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511645
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: xtrs
Version: 4.9c-3
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu intrepid ubuntu-patch

Hi,

In https://bugs.launchpad.net/bugs/223098 it was reported that
xtrs can hang on startup. At http://www.tim-mann.org/xtrs.html
the instructions are to remove -DHAVE_SIGIO from the Makefile,
which the attached patch does.

In addition to that it fixes up a couple of coding issues that
Ubuntu's compiler found. There are two instances of
"format not a string literal and no format arguments", and
some places where the return codes of functions are not checked.

For the instances of that problem in trs_disk.c I just hid the
problem, as there is no error checking of other functions in
that code it didn't seem worth having it. Obviously adding error
checking would be preferable.

Please consider applying the patch.

Thanks,

James
--- xtrs-4.9c.orig/Makefile
+++ xtrs-4.9c/Makefile
@@ -143,7 +143,7 @@
 include Makefile.local
 
 CFLAGS = $(DEBUG) $(ENDIAN) $(DEFAULT_ROM) $(READLINE) $(DISKDIR) $(IFLAGS) \
-       $(APPDEFAULTS) -DKBWAIT -DHAVE_SIGIO
+       $(APPDEFAULTS) -DKBWAIT
 LIBS = $(XLIB) $(READLINELIBS) $(EXTRALIBS)
 
 ZMACFLAGS = -h
only in patch2:
unchanged:
--- xtrs-4.9c.orig/debug.c
+++ xtrs-4.9c/debug.c
@@ -515,7 +515,7 @@
 	{
 	    if(!strcmp(command, "help") || !strcmp(command, "?"))
 	    {
-		printf(help_message);
+		printf("%s", help_message);
 	    }
 	    else if (!strcmp(command, "zbxinfo"))
 	    {
only in patch2:
unchanged:
--- xtrs-4.9c.orig/dis.c
+++ xtrs-4.9c/dis.c
@@ -2115,7 +2115,7 @@
 	break;
       case A_0:  /* No args */
       case A_0B: /* No args, backskip over last opcode byte */
-	printf (code->name);
+	printf ("%s", code->name);
 	break;
       case A_8R: /* One 8-bit relative address */
 	printf (code->name, (pc + 1 + (char) mem_read(pc)) & 0xffff);
only in patch2:
unchanged:
--- xtrs-4.9c.orig/mkdisk.c
+++ xtrs-4.9c/mkdisk.c
@@ -15,6 +15,7 @@
 
 #include <stdio.h>
 #include <unistd.h>
+#include <errno.h>
 #include <time.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -44,6 +45,7 @@
   int cyl = -1, sec = -1, gran = -1, dir = -1, eight = 0, ignden = 0;
   int writeprot = 0, unprot = 0;
   int i, c, oumask;
+  int written;
   char *fname;
   FILE *f;
 
@@ -385,7 +387,15 @@
       perror(fname);
       exit(1);
     }
-    fwrite(&rhh, sizeof(rhh), 1, f);
+    do {
+      written = fwrite(&rhh, sizeof(rhh), 1, f);
+      if (written >= 1)
+        break;
+    } while (written >= 0 || errno == EINTR);
+    if (written < 0) {
+      perror(fname);
+      exit(1);
+    }
   }
   fclose(f);
   return 0;
only in patch2:
unchanged:
--- xtrs-4.9c.orig/trs_disk.c
+++ xtrs-4.9c/trs_disk.c
@@ -674,7 +674,7 @@
     } else {
       newlen = offset(d, 0);
     }
-    ftruncate(fileno(d->file), newlen);
+    if (ftruncate(fileno(d->file), newlen)) {}
   }
 }
 
@@ -808,7 +808,7 @@
 
     /* Read first block of ids */
     fseek(d->file, JV3_IDSTART, 0);
-    fread((void*)&d->u.jv3.id[0], 3, JV3_SECSPERBLK, d->file);
+    if (fread((void*)&d->u.jv3.id[0], 3, JV3_SECSPERBLK, d->file)) {}
 
     /* Scan to find their offsets */
     ofst = JV3_SECSTART;
@@ -2217,7 +2217,7 @@
     fseek(d->file, DMK_HDR_SIZE +
 	  (d->phytrack * d->u.dmk.nsides + state.curside) *
 	  d->u.dmk.tracklen, 0);
-    fwrite(d->u.dmk.buf, d->u.dmk.curbyte, 1, d->file);
+    if (fwrite(d->u.dmk.buf, d->u.dmk.curbyte, 1, d->file)) {}
     if (d->phytrack >= d->u.dmk.ntracks) {
       d->u.dmk.ntracks = d->phytrack + 1;
       fseek(d->file, DMK_NTRACKS, 0);

--- End Message ---
--- Begin Message ---
Source: xtrs
Source-Version: 4.9c-4

We believe that the bug you reported is fixed in the latest version of
xtrs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 511...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
G. Branden Robinson <g.branden.robin...@gmail.com> (supplier of updated xtrs 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 30 Mar 2017 09:20:32 -0400
Source: xtrs
Binary: xtrs
Architecture: source
Version: 4.9c-4
Distribution: unstable
Urgency: medium
Maintainer: G. Branden Robinson <g.branden.robin...@gmail.com>
Changed-By: G. Branden Robinson <g.branden.robin...@gmail.com>
Description:
 xtrs       - emulator for TRS-80 Model I/III/4/4P computers
Closes: 511645
Changes:
 xtrs (4.9c-4) unstable; urgency=medium
 .
   * Makefile: Undefine HAVE_SIGIO.  (Closes: #511645)
   * Update Maintainer full name and email address from the "old me" to the
     "new me".
Checksums-Sha1:
 032f2eedfc1a4d260f0826d3e076cf5e482f37e0 1810 xtrs_4.9c-4.dsc
 f31203ae8c2f1cc8eceb5cb687dad8b4b5731bb1 101820 xtrs_4.9c-4.diff.gz
Checksums-Sha256:
 5f8d4d18df9bc446c257f7cc4f3af2d6d411acbc48241c0969b14b0ded9bf126 1810 
xtrs_4.9c-4.dsc
 6a14a7cd2e815bf77632b230be22640c43e0b30b2c790a916c138d18fe7e4f9a 101820 
xtrs_4.9c-4.diff.gz
Files:
 c21752b27198f31f3ce6677c18623b65 1810 contrib/otherosfs extra xtrs_4.9c-4.dsc
 75efbc8ac0abadc9b766ef1990e0907d 101820 contrib/otherosfs extra 
xtrs_4.9c-4.diff.gz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEm5FwB64DDjbk/CSLaVt65L8GYkAFAljfwuwACgkQaVt65L8G
YkCyzxAAskyuTdd9vUuayR/Cz7CfQ6kAg3sz8W03f3TaNVeC3kLDNAKXc8Bl//Dr
29pDjqek+wVQVEcQH5ZgF08968SSR0X0o2wOcl+ampodBn3sNWNbD9U29XJ5x+Aa
v5+Y5NbGgu9/XNEEdGJ7TR8V/GQe8iu2QtD6q6qXZYWNFCTEcIcAmKQjFVwWOPx0
sZo2ZdKAecIrBCuEBGVJ5KFZvSTxCeTPckRxrU5Uq5jagJ8MjVqX4ebLv6OLRKDM
r7aM9dWfLQYDRS2HLplVS24jVvBTw129uzs6EWa6v7f2X4m37qrVJJgX6SQueqA2
FVL4dWwVuJyRbJIZa/bUIqltdVs634dG84TGDVa5Pb3HUgm8PzxM6XZ2eKphlmN0
rdHDH1B38WqMLJ/yL3ki5/P/7s7XcwkCdASLZiRVEM1R4Fj1fZYk95cL9IUo7H/+
5GVhLWcDmFXuxKZbBT7GFauY+eX6IwfNmFeSStBLP44gZ0SNtLrS9Vf0s/Vk3RBJ
qeWq/5+GjGwIZq0PAKZiwGLZKXuToD5cWKFjg6r0gFoOO7Z+ebfA913A1Moku4kY
2hRh66Rd4NKGfYaDQH3dZKRwPQ8jEenVE30ifawOrrGhhdVBiNRMiai1X4ChAoAh
ubaRl3xRJOnANWg3HQLlNF04gPwgx3YPJcmkJhYVyCLJ1LJLwzU=
=TW2m
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to