Re: [Afpfs-ng-devel] length of volumename is wrong
Status: Alpha
Brought to you by:
alexthepuffin
From: Alex d. <ale...@gm...> - 2008-07-16 14:08:55
|
HAT, Yes, that doesn't seem right and I cannot remember where I got that data from. I probably wrote that when I started this two years, and in looking through the 3.1 docs it looks incorrect. I may have taken this from netatalk. Is the solution just to increase the length of AFP_VOLUME_NAME_UTF8_LEN to 255? It looks like AFP_VOLUME_NAME_LEN should be 27. Are there similiar problems with server name lengths? I actually use the machine type to detect the server type, which is useful for: - compensating for broken servers, particularly netatalk but also the Apple extreme - displaying logos in GUIs when browsing for servers There is a larger problem with filenames, I have a maximum filename length of 255 bytes, but in reality the length is up to 16 bits. In many places I preallocate the space for the filename, which is fine for a small number, but there are many places I don't want to allocate 64k. Changing this requires a lot of rework of anything that allocates space that references a filename. This is left for a later release. I expect you'll hit this too. - Alex On 16-Jul-08, at 9:28 AM, HAT wrote: > Alex, > > Have you already noticed a problem of volumename length? > > If volumename is non-ASCII, UTF8 string is very long. > Actually, I cannot mount two of three volumes on Mac OS X 10.5.4. > This problem is fatal. > > In include/afp_protocol.h, > > #define AFP_VOLUME_NAME_LEN 33 > > For AFP2.x, this command returns volume names in ANSI format with a > maximum length of 27 bytes. > > > #define AFP_VOLUME_NAME_UTF8_LEN 33 > > For AFP3.x, this command returns volume names in UTF-8 format with a > one > byte length byte specifying any length up to 255. Note that the Finder > limits setting volume names to no more than 27 characters. > > #define AFP_MACHINETYPE_LEN 33 > > A string in Pascal format of up to 16 characters that describes the > file > servers hardware and software but has no significance to AFP. > > > If you do not know it, I report after examining it a little more. > > -- > HAT > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Afpfs-ng-devel mailing list > Afp...@li... > https://lists.sourceforge.net/lists/listinfo/afpfs-ng-devel |