Репозитории ALT
S: | 2.1.5-alt4 |
5.1: | 2.1.5-alt3 |
4.1: | 2.1.5-alt3 |
4.0: | 2.1.5-alt3 |
3.0: | 2.1.0-alt1 |
Другие репозитории
Upstream: | 2.1.5 |
Группа :: Система/Ядро и оборудование
Пакет: eject
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: eject-2.1.5-alt-fixes.patch
Скачать
Скачать
--- eject/configure.in
+++ eject/configure.in
@@ -3,6 +3,7 @@ AC_INIT(eject.c)
AM_INIT_AUTOMAKE(eject, 2.1.5)
dnl Checks for programs
+AC_GNU_SOURCE
AC_PROG_CC
dnl Checks for options
--- eject/eject.c
+++ eject/eject.c
@@ -609,8 +609,7 @@ static int ReadSpeedCdrom(const char *shortName)
exit(1);
}
- while (!feof(f)) {
- fgets(line, sizeof(line), f);
+ while (!feof(f) && fgets(line, sizeof(line), f)) {
/* find drive number from shortName in line "drive name" */
if (drive_number == -1) {
@@ -637,6 +636,7 @@ static int ReadSpeedCdrom(const char *shortName)
fprintf(stderr, _("%s: error while reading speed\n"), programName);
exit(1);
}
+ fclose(f);
return atoi(str_speed);
}
}
@@ -1002,8 +1002,7 @@ static char *SymLink(const char *name)
snprintf(result, sizeof(result)-1, "%s%s", s2, s1);
}
}
- realpath(result, s4);
- return strdup(s4);
+ return realpath(result, s4) ? strdup(s4) : NULL;
}
@@ -1091,7 +1090,7 @@ int main(int argc, char **argv)
I18NCODE
/* program name is global variable used by other procedures */
- programName = strdup(argv[0]);
+ programName = program_invocation_short_name;
/* parse the command line arguments */
parse_args(argc, argv, &device);