makefs: remove CD9660MAXPATH #define
It was used only in constructing the host path that contains file content, which is not related to anything CD9660-specific. PATH_MAX is the appropriate limit. See OpenBSD commit 299d8950f319. Obtained from: OpenBSD Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
a9d0665bbb
commit
2f11df6337
@ -1582,10 +1582,10 @@ cd9660_compute_full_filename(cd9660node *node, char *buf)
|
||||
{
|
||||
int len;
|
||||
|
||||
len = CD9660MAXPATH + 1;
|
||||
len = PATH_MAX;
|
||||
len = snprintf(buf, len, "%s/%s/%s", node->node->root,
|
||||
node->node->path, node->node->name);
|
||||
if (len > CD9660MAXPATH)
|
||||
if (len >= PATH_MAX)
|
||||
errx(EXIT_FAILURE, "Pathname too long.");
|
||||
}
|
||||
|
||||
|
@ -65,8 +65,6 @@
|
||||
#define INODE_WARNX(__x)
|
||||
#endif /* DEBUG */
|
||||
|
||||
#define CD9660MAXPATH 4096
|
||||
|
||||
#define ISO_STRING_FILTER_NONE = 0x00
|
||||
#define ISO_STRING_FILTER_DCHARS = 0x01
|
||||
#define ISO_STRING_FILTER_ACHARS = 0x02
|
||||
|
@ -273,7 +273,7 @@ cd9660_write_file(iso9660_disk *diskStructure, FILE *fd, cd9660node *writenode)
|
||||
|
||||
/* Todo : clean up variables */
|
||||
|
||||
temp_file_name = ecalloc(CD9660MAXPATH + 1, 1);
|
||||
temp_file_name = ecalloc(PATH_MAX, 1);
|
||||
buf = emalloc(diskStructure->sectorSize);
|
||||
if ((writenode->level != 0) &&
|
||||
!(writenode->node->type & S_IFDIR)) {
|
||||
|
Loading…
Reference in New Issue
Block a user