[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

amiga-fdisk 0.4 and debian/potato boot floppies.

Hello, ...

Some time ago i upgraded the amiga-fdisk 0.03 to 0.04 in a NMU, as well as
recompiled it for powerpc for the apus system.

Now i am working on debian/powerpc/apus boot floppies, and noticed the
following problem.

the 0.04 amiga-fdisk uses libreadline to do its input/output, so it will bring
both libreadlineg and libncurses into the rootdisks, which is not ok. I tried
compiling it staticaly, but got a 500kb binary, not the best solution also,
but then maybe i misunderstood how to do this, if so please someone explain to
me how to do this.

After that i did a quick hack to compile a amiga-fdisk that will no more use
libreadline. The hack is as follows :

--- amiga-fdisk-0.04.orig/fdisk.c
+++ amiga-fdisk-0.04/fdisk.c
@@ -26,8 +26,10 @@
 #include <string.h>
 #include <getopt.h>

  #include <readline/readline.h>
  #include <readline/history.h>

  #include <asm/byteorder.h>

@@ -38,6 +40,23 @@
 #define VERSION "0.04"
 #define RELDATE "98/11/03"

+char *readline (const char *prompt)
+       char buffer[1024];
+       char *s;
+       int size;
+       printf ("%s",prompt);
+       fflush (stdout);
+       scanf ("%s", buffer);
+       size = strlen (buffer);
+       s = malloc ((size+1)*sizeof(char));
+       s = strcpy (s, buffer);
+       fflush (stdin);
+       return s;
 char *testdevs[] = { "/dev/hda", "/dev/hdb", "/dev/hdc", "/dev/hdd",
                      "/dev/sda", "/dev/sdb", "/dev/sdc", "/dev/sdd",
                      "/dev/sde", "/dev/sdf", "/dev/sdg", "/dev/sdh",

Ok, this works somewhat, i tested it quickly, and don't brings libreadline in.
But the changelog of amiga-fdisk says that it got to use libreadline instead
of gets because gets is buggy, or pose a security hazard, or whatever.

Anyone can give some light about this ? is my solution better/worse/the same
as using gets ? 

Ok, that said, i have no a amiga-fdisk-0.4-1.1 package which don't uses
libreadline. This version is to be used for the boot floppies, but not for the
normal use. So i guess best would be to have two binary package from amiga
fdisk, one called amiga-fdisk is to be used by everyone, the other, called
amiga-fdisk-boot-floppies, or something such is to be used by the boot
floppies folk.

Frank, what do you think about this ?
Is the maintainer address in the package still ok ? I think not since you are
no more in oldenburg, or are you ? 

What do the debian/m68k boot-floppies folk think about his ? Did you encounter
this problem already, did you solve it ? 

If nobody objects, i will go on with the dual package stuff, and do a NMU of



Reply to: