From 3f7e6fbc27c88a18c32c3d7fddb1259a6e51bd89 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Fri, 12 Jul 2002 03:06:57 +0000 Subject: apply pbrown's patch to change disc info files to be .discinfo and have all of the relevant information. this will allow for similar formatting for other product CDs such as the lacd --- loader/loader.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'loader') diff --git a/loader/loader.c b/loader/loader.c index 0e76a4502..ac4627370 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -832,8 +832,8 @@ char *getReleaseDescriptorFromIso(char *file) { errno = 0; stampfile = NULL; while ((ent = readdir(dir))) { - if (!strncmp(ent->d_name, ".disc", 4)) { - stampfile = strdup(ent->d_name); + if (!strncmp(ent->d_name, ".discinfo", 9)) { + stampfile = strdup(".discinfo"); break; } } @@ -846,17 +846,14 @@ char *getReleaseDescriptorFromIso(char *file) { if (f) { char *tmpptr; + /* skip over time stamp line */ tmpptr = fgets(tmpstr, sizeof(tmpstr), f); + /* now read OS description line */ if (tmpptr) tmpptr = fgets(tmpstr, sizeof(tmpstr), f); fclose(f); - - if (tmpptr >= 0 && strlen(tmpstr) > 0) { - for (ptr = tmpstr+strlen(tmpstr) - 1; - ptr != tmpstr && isspace(*ptr); ptr--); - *(ptr+1) = '\0'; + if (tmpptr) descr = tmpstr; - } } } -- cgit