aboutsummaryrefslogtreecommitdiffstats
path: root/dos/syslinux.c
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-15 21:56:04 +0000
committerhpa <hpa>2004-12-15 21:56:04 +0000
commit9ebb55c50870cc136da18715cc1a53db5c3f8431 (patch)
treec40b7b7419f0bac205b117041d56bc960fd2aff5 /dos/syslinux.c
parent77cfe4bb9b00690ab3b87a105eed5c430f97bb18 (diff)
downloadsyslinux-devel-9ebb55c50870cc136da18715cc1a53db5c3f8431.tar.gz
syslinux-devel-9ebb55c50870cc136da18715cc1a53db5c3f8431.tar.xz
syslinux-devel-9ebb55c50870cc136da18715cc1a53db5c3f8431.zip
Adjust the interface to syslxmod.c so the DOS installer doesn't need
printf().
Diffstat (limited to 'dos/syslinux.c')
-rw-r--r--dos/syslinux.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/dos/syslinux.c b/dos/syslinux.c
index 820e1cbc..ba6590c5 100644
--- a/dos/syslinux.c
+++ b/dos/syslinux.c
@@ -30,13 +30,15 @@ const char *program = "syslinux"; /* Name of program */
void __attribute__((noreturn)) usage(void)
{
- fprintf(stderr, "Usage: %s [-sf] drive:\n", program);
+ puts("Usage: syslinux [-sf] drive:\n");
exit(1);
}
void __attribute__((noreturn)) die(const char *msg)
{
- fprintf(stderr, "%s: %s\n", program, msg);
+ puts("syslinux: ");
+ puts(msg);
+ putchar('\n');
exit(1);
}
@@ -149,6 +151,7 @@ int main(int argc, char *argv[])
int32_t ldlinux_cluster;
int nsectors;
char *device = NULL;
+ const char *errmsg;
(void)argc; /* Unused */
@@ -190,7 +193,9 @@ int main(int argc, char *argv[])
/*
* Check to see that what we got was indeed an MS-DOS boot sector/superblock
*/
- if(!syslinux_check_bootsect(sectbuf,device)) {
+ if(!syslinux_check_bootsect(sectbuf,&errmsg)) {
+ puts(errmsg);
+ putchar('\n');
exit(1);
}