Use the defined values from bootdir.h. This was part of an experiment to

increase the length of names we can use for adding things to the floopy,
but it didn't work. Still, these changes seem to make sense.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@284 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
David Reid 2002-07-17 19:37:28 +00:00
parent 08b993b215
commit 19111f404e

View File

@ -426,8 +426,8 @@ void makeboot(section *s, char *outfile)
if(!type) die("section %s has no type",s->name);
strncpy(centry.be_name,s->name,32);
centry.be_name[31] = 0;
strncpy(centry.be_name,s->name, BOOTDIR_NAMELEN);
centry.be_name[BOOTDIR_NAMELEN - 1] = 0;
if(!file) die("section %s has no file",s->name);
rawdata[c]= ((strcmp(type, "elf32")==0)?loadstripfile:loadfile)(file,&rawsize[c]);
@ -475,7 +475,7 @@ void makeboot(section *s, char *outfile)
c++;
s = s->next;
if(c==64) die("too many sections (>63)",NULL);
if(c == BOOTDIR_MAX_ENTRIES) die("too many sections (>63)",NULL);
}
if((fd = open(outfile, O_BINARY|O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0) {