From d3326997e61d960a4f548420aa1589bf272063ba Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Thu, 29 Oct 1998 17:04:16 +0000 Subject: fix for those boxens like hppa which do not supply boot file name so we have to decide for 'em, like open the first file from the list in the config. kids tested mother approved. --- usr.sbin/rbootd/rmpproto.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.sbin/rbootd/rmpproto.c b/usr.sbin/rbootd/rmpproto.c index c3e8054664d..e704672a312 100644 --- a/usr.sbin/rbootd/rmpproto.c +++ b/usr.sbin/rbootd/rmpproto.c @@ -326,9 +326,15 @@ SendBootRepl(req, rconn, filelist) /* * Copy file name to `filepath' string, and into reply packet. */ - src = &req->r_brq.rmp_flnm; dst1 = filepath; dst2 = &rpl->r_brpl.rmp_flnm; + if (req->r_brq.rmp_flnmsize) + src = &req->r_brq.rmp_flnm; + else { + /* no file supplied, substitute the first one */ + src = filelist[0]; + req->r_brq.rmp_flnmsize = strlen(src); + } for (i = 0; i < req->r_brq.rmp_flnmsize; i++) *dst1++ = *dst2++ = *src++; *dst1 = '\0'; -- cgit v1.2.3