# HG changeset patch # User Pascal Bellard # Date 1370934269 -7200 # Node ID 1e434243dc3180f036a6ed8eb3e6786c1cfe77e0 # Parent 91aaa33157f6f114d3dc23d71c74869a34e6d195 Add libnl1 diff -r 91aaa33157f6 -r 1e434243dc31 fusecloop/stuff/fusecloop.u --- a/fusecloop/stuff/fusecloop.u Sun Jun 09 16:52:49 2013 +0200 +++ b/fusecloop/stuff/fusecloop.u Tue Jun 11 09:04:29 2013 +0200 @@ -165,7 +165,7 @@ exit(1); } -@@ -24,44 +28,91 @@ +@@ -24,44 +28,99 @@ exit(1); } @@ -226,13 +226,15 @@ + fprintf(stderr, "Index %s.\n", build_index(offsets, num_blocks)); + + if (argc > 2) { ++ unsigned n; + loff_t data, offset = ((num_blocks + 1) * sizeof(offset)) + sizeof(head); + + strcpy(head.preamble, CLOOP_PREAMBLE); -+ write(STDOUT_FILENO, &head, sizeof(head)); ++ write(STDOUT_FILENO, &head, n = sizeof(head)); + for (i = 0; i < num_blocks; i++) { + data = __be64_to_cpu(offset); + write(STDOUT_FILENO, &data, sizeof(data)); ++ n += sizeof(data); + offset += offsets[i].size; + } + data = __be64_to_cpu(offset); @@ -240,6 +242,12 @@ + for (i = 0; i < num_blocks && lseek64(handle, offsets[i].offset, SEEK_SET) >= 0; i++) { + read(handle, buffer, offsets[i].size); + write(STDOUT_FILENO, buffer, offsets[i].size); ++ n += offsets[i].size; ++ } ++ n &= 0x1FF; ++ if (n) { ++ memset(buffer, 0, 512); ++ write(STDOUT_FILENO, buffer, 512 - n); + } + return 0; + } @@ -283,7 +291,7 @@ if (i == 3) { fprintf(stderr, "Block head:%02X%02X%02X%02X%02X%02X%02X%02X\n", -@@ -105,12 +156,12 @@ +@@ -105,12 +164,12 @@ fprintf(stderr, "Uncomp: unknown error %u\n", i); exit(1); } diff -r 91aaa33157f6 -r 1e434243dc31 libnl1-dev/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libnl1-dev/receipt Tue Jun 11 09:04:29 2013 +0200 @@ -0,0 +1,18 @@ +# SliTaz package receipt. + +PACKAGE="libnl1-dev" +VERSION="1.1.4" +CATEGORY="network" +SHORT_DESC="netlink library devel files." +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://people.suug.ch/~tgr/libnl" +WANTED="libnl1" +DEPENDS="libnl1" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr + cp -a $install/usr/include $fs/usr +} + diff -r 91aaa33157f6 -r 1e434243dc31 libnl1/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libnl1/receipt Tue Jun 11 09:04:29 2013 +0200 @@ -0,0 +1,27 @@ +# SliTaz package receipt. + +PACKAGE="libnl1" +VERSION="1.1.4" +SOURCE="libnl" +CATEGORY="network" +SHORT_DESC="netlink library." +MAINTAINER="pascal.bellard@slitaz.org" +TARBALL="$SOURCE-$VERSION.tar.gz" +WEB_SITE="http://people.suug.ch/~tgr/libnl" +WGET_URL="$WEB_SITE/files/$TARBALL" + +BUILD_DEPENDS="flex" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure && make && make install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr + cp -a $install/usr/lib $fs/usr +}