G. Nau
2004-Jul-21 17:53 UTC
[syslinux] Request to an hpa-TFTP enhancement - convert '\' in filenames to '/'
Hello, I'm working on getting BartPE (normally a LiveCD of Windows XP) network booted by PXE from a Linux TFTPD server. Normally a M$ RIS server with Active Directory and stuff is necessary, but the basic filetransfers are all done by TFTP and SMB and can therefore be delivered by a Linux machine. I'm referring to this documentation http://oss.netfarm.it/guides/pxe.php how to do that. Most of the stuff is simple and there have to be some python based tools installed on the Linux machine. BUT, to satisfy the booting XP machine, the TFTP server has to accept '\' in filenames and convert them to be accepted by Linux and the TFTP process. The above mentioned website contains a patch for the AFTPD server to make this conversion.>>>switch (retval) { case GET_RRQ: + { + /* Windows client hack */ + char *seek = (char*) &(data->tftp_options[OPT_FILENAME].value);+ if (*seek == '\\') + while (*seek) + { + if (*seek == '\\') *seek = '/'; + seek++; + } logger(LOG_NOTICE, "Serving %s to %s:%d", data->tftp_options[OPT_FILENAME].value,inet_ntoa(data->client_info->client.sin_addr),@@ -665,6 +674,7 @@ stats_send_locked(); else stats_err_locked(); + } break; case GET_WRQ: logger(LOG_NOTICE, "Fetching from %s to %s", <<< I would be very pleased to get such a '\' -> '/' conversion the the hpa- tftpd server we are using for years now. For the experienced programmers here it shouldn't be a big deal if my request is accepted as helpful, easy to be implemented and without any side- effects. Thanks in advance Bernd
H. Peter Anvin
2004-Jul-22 16:17 UTC
[syslinux] Request to an hpa-TFTP enhancement - convert '\' in filenames to '/'
G. Nau wrote:> > I would be very pleased to get such a '\' -> '/' conversion the the hpa- > tftpd server we are using for years now. For the experienced > programmers here it shouldn't be a big deal if my request is > accepted as helpful, easy to be implemented and without any side- > effects. >Just use the regex replacement that is already there. -hpa
G. Nau
2004-Jul-22 19:32 UTC
[syslinux] Request to an hpa-TFTP enhancement - convert '\' in filenames to '/'
hpa wrote:>>Just use the regex replacement that is already there.<<Great! That's exactly what I was looking for!! Regards Bernd
Gianluigi Tiesi
2004-Jul-23 03:09 UTC
[syslinux] Request to an hpa-TFTP enhancement - convert '\' in filenames to '/'
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 My patch was for aftpd, I've added references and info about hpa tftp since it doesn't need patches, I'm considering to switch myself to hpa tftpd. Again sorry if this post doesn't nest over the original thread, but I've not found any method to do this with mozilla thunderbird. Best Regards - -- Gianluigi Tiesi <sherpya at netfarm.it> EDP Project Leader Netfarm S.r.l. - http://www.netfarm.it/ Free Software: http://oss.netfarm.it/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBAIFa3UE5cRfnO04RAhF7AKCFq8rcm5+FT3Or0PdVtRl0IuJ41ACcDETH cQmsBBHgzJHtjgXNW+qe2O4=/704 -----END PGP SIGNATURE-----