# HG changeset patch # User Pascal Bellard # Date 1451823438 -3600 # Node ID 1bbbc99b3df2274ef708c75cc31d5dd90488b615 # Parent 0baf19fb14ded57573cbd006d6d077ea21063646 syslinux: set tz command line argument diff -r 0baf19fb14de -r 1bbbc99b3df2 syslinux/receipt --- a/syslinux/receipt Sat Jan 02 22:26:27 2016 +0100 +++ b/syslinux/receipt Sun Jan 03 13:17:18 2016 +0100 @@ -58,52 +58,57 @@ cp $stuff/*.cfg $stuff/*.txt $stuff/help.* $stuff/opts.* $fs/boot/isolinux rm -f $fs/boot/isolinux/common.cfg $fs/boot/isolinux/default.cfg rm -f $fs/boot/isolinux/display.txt - while read label kbd loc menu; do + while read label kbd loc tz menu; do for i in ${kbd/,/ }; do [ -e $src/kbd/$i ] || continue cat >> $fs/boot/isolinux/i18n.cfg <> $fs/boot/isolinux/i18n.cfg < #endif #ifdef __MSDOS__ -#define ftruncate(a,b) +int ftruncate(int fd, long newsize) +{ + if (lseek(fd, newsize, SEEK_SET) != -1L) + return write(fd, NULL, 0); + return -1; +} #endif #ifdef __MINGW32__ #define ftruncate chsize @@ -263,12 +268,13 @@ } } -static void clear_config(unsigned i) +static unsigned clear_config(unsigned i) { for (;i % 512; i++) { /* clear custom config */ write(fd, buffer + 2048, 2048); } + return i; } static unsigned install(char *filename) @@ -309,7 +315,7 @@ } i = getcustomsector(); lseek(fd, i * 2048UL, SEEK_SET); - clear_config(i); + i = clear_config(i); ftruncate(fd, i * 2048UL); close(fd); status = 0;