[syslinux] patch to deal with empty filenames

Kevin D. Clark clark_k at pannaway.com
Wed Aug 4 05:26:48 PDT 2004


"H. Peter Anvin" <hpa at zytor.com> writes:

> Unnecessary.  Use the regular expression remapping feature.

Sorry, you are incorrect.

The original code never allows you to use the regular expression
remapping feature for this particular case (I tried this first).

The original code is written such that an empty filename causes most
of the while-statement in tftpd/tftpd.c:739 to be skipped.  After
this, the following expression is executed:

  /* tftpd/tftpd.c:792 */
  if (!pf) {
    nak(EBADOP, "Missing mode");
    exit(0);
  }

...which is a confusing error message when you're on the client side
of the connection.

My choice of using the filename "blank" is somewhat arbitrary, I could
have picked "" or "this is a blank filename" -- I don't want to quibble
over this.  But the fact remains that the regular expression remapping
feature is unavailable without modifying the code in some way.  My
patch is one approach.

Regards,

--kevin
-- 
GnuPG ID: B280F24E




More information about the Syslinux mailing list