diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1998-10-29 17:04:16 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1998-10-29 17:04:16 +0000 |
commit | d3326997e61d960a4f548420aa1589bf272063ba (patch) | |
tree | c18335cf0a118fb4c214ff716f4f28610dee6fca | |
parent | 48e72123566c3d7650be6571b80f9f70b41c6724 (diff) |
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.
-rw-r--r-- | usr.sbin/rbootd/rmpproto.c | 8 |
1 files changed, 7 insertions, 1 deletions
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'; |