search for: alphasort

Displaying 20 results from an estimated 142 matches for "alphasort".

2011 Aug 02
6
[PATCH v2 0/4] Support drop directories directly from kinit
This patchset applies to klibc mainline. This patchset introduces the ability to kinit to execute scripts or executable files present in in the initramfs before switching over to the root filesystem. It is implemented by first implementing scandir() and alphasort() as present in POSIX.1-2008 in klibc itself, and then using that as the basis for iterating and executing files via a run_scripts() call. This patchset introduces two different drop directories, though this is of course subject to change and these are only presented in an effort to put an example...
2011 Jul 29
3
[PATCH 1/3] klibc: Add scandir() and alphasort() support.
Add support for scandir() and alphasort() as defined in POSIX.1-2008. Signed-off-by: Mike Waychison <mikew at google.com> --- usr/include/dirent.h | 7 +++++ usr/klibc/Kbuild | 2 + usr/klibc/scandir.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletions(-) create m...
2012 Mar 20
1
overriding "summary.default" or "summary.data.frame". How?
...ase functions? It appears my functions (summarizeFactors) can find my summary.factor, but R's own summary uses its own summary.factor. ## summarizeNumerics takes a data frame or matrix, scans the columns ## to select only the numeric variables. By default it alphabetizes ## the columns (use alphaSort = FALSE to stop that). It then ## calculates the quantiles for each variable, as well as the mean, ## standard deviation, and variance, and then packs those results into ## a matrix. The main benefits from this compared to R's default ## summary are 1) more summary information is returned for e...
2006 Oct 03
2
strverscmp, scandir, alphasort and versionsort
Hello, These are implementations of strverscmp, scandir, alphasort and versionsort, and some test cases for them. I know these aren't in POSIX, but they're useful, nonetheless, and someone else might be interested in them. Regards, Luciano Rocha -- lfr 0/0 -------------- next part -------------- /* ------------------------------------------------------...
2009 Jan 17
0
libtheora fails to compile examples on Solaris
...mv -f ".deps/png2theora-png2theora.Tpo" ".deps/png2theora-png2theora.Po"; else rm -f ".deps/png2theora-png2theora.Tpo"; exit 1; fi png2theora.c: In function `main': png2theora.c:510: warning: implicit declaration of function `scandir' png2theora.c:510: error: `alphasort' undeclared (first use in this function) png2theora.c:510: error: (Each undeclared identifier is reported only once png2theora.c:510: error: for each function it appears in.) make[2]: *** [png2theora-png2theora.o] Error 1 make[2]: Leaving directory `/export/home/quix0r/more/libtheora-1.0/exampl...
2006 Oct 11
1
screenshot plugin compile fails on freebsd
Hello list, there is no `versionsort' implementation in the dirent.h on standard installation of freebsd 6.x. I have replaced `versionsort' with `alphasort' in screenshot.c, but I don't know whether that fix will cause crash screenshot plugin since I have not yet ran the latest git xgl/compiz/mesa on my freebsd. -- Best regards, Denis mailto:latypoff@yandex.ru
2011 Aug 03
2
[PATCH v3 0/2] Support drop directories directly from kinit
...se case for initramfs-tools, opening the door to replace all the "core" shell there with kinit as a C implementation. Thanks, Mike Waychison Changelog ========= v3 - Renamed run_scripts() to run_parts(). - Introduced the build of a standalone run-parts binary. - Dropped the alphasort and scandir parts of the series as they are now merged. v2 - Added __extern to alphasort declaration. - Split alphasort() out into alphasort.c and its own patch. Related discussions =================== - We recently had a discussion at: http://www.zytor.com/pipermail/klibc...
2010 Mar 01
1
adding directory contents to ogg123 playing in sorted order?
Would a patch to ogg123 for using scandir(3) and alphasort(3) instead of opendir(3) and readdir(3) in playlist_append_directory() be accepted, or are those not sufficiently portable? On Linux, _SVID_SOURCE or _BSD_SOURCE is required to use them. This shouldn't be hard to implement and I'd like very much to have directories added to the playlist in...
2007 Jul 31
1
[Bridge] brctl uses incorrect sysfs path
...ent **namelist; char path[SYSFS_PATH_MAX]; + struct stat st; - snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/brport", brname); + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/brif", brname); count = scandir(path, &namelist, 0, alphasort); if (count < 0) return old_foreach_port(brname, iterator, arg); for (i = 0; i < count; i++) { + if (stat(namelist[i]->d_name, &st) == -1) + continue; + if (!S_ISLNK(st.st_mode)) +...
2011 Aug 10
1
[PATCH v2] dirent.h add fdopendir()
...c4f9ae2..48575a5 100644 --- a/usr/klibc/Kbuild +++ b/usr/klibc/Kbuild @@ -42,7 +42,8 @@ klib-y := vsnprintf.o snprintf.o vsprintf.o sprintf.o \ seteuid.o setegid.o \ getenv.o setenv.o putenv.o __put_env.o unsetenv.o \ clearenv.o nullenv.o \ - getopt.o getopt_long.o readdir.o scandir.o alphasort.o remove.o \ + getopt.o getopt_long.o \ + readdir.o scandir.o fdopendir.o alphasort.o remove.o \ syslog.o closelog.o pty.o getpt.o posix_openpt.o isatty.o reboot.o \ time.o utime.o llseek.o nice.o getpriority.o \ qsort.o bsearch.o \ diff --git a/usr/klibc/fdopendir.c b/usr/klibc/fdo...
2016 Jan 06
0
[klibc:master] Remove obsolete getpt() function
...b/usr/klibc/Kbuild index 7d95e87..5521038 100644 --- a/usr/klibc/Kbuild +++ b/usr/klibc/Kbuild @@ -52,7 +52,7 @@ klib-y += vsnprintf.o snprintf.o vsprintf.o sprintf.o \ getenv.o setenv.o putenv.o __put_env.o unsetenv.o \ clearenv.o nullenv.o \ getopt.o getopt_long.o readdir.o scandir.o alphasort.o remove.o \ - syslog.o closelog.o pty.o getpt.o posix_openpt.o isatty.o reboot.o \ + syslog.o closelog.o pty.o posix_openpt.o isatty.o reboot.o \ time.o utime.o lseek.o nice.o getpriority.o \ qsort.o bsearch.o \ lrand48.o jrand48.o mrand48.o nrand48.o srand48.o seed48.o \ diff --gi...
2016 Jan 27
0
[klibc:master] Make posix_openpt() an inline
...b/usr/klibc/Kbuild index a0e440d..eba6add 100644 --- a/usr/klibc/Kbuild +++ b/usr/klibc/Kbuild @@ -52,7 +52,7 @@ klib-y += vsnprintf.o snprintf.o vsprintf.o sprintf.o \ getenv.o setenv.o putenv.o __put_env.o unsetenv.o \ clearenv.o nullenv.o \ getopt.o getopt_long.o readdir.o scandir.o alphasort.o remove.o \ - syslog.o closelog.o pty.o posix_openpt.o isatty.o reboot.o \ + syslog.o closelog.o pty.o isatty.o reboot.o \ time.o utime.o lseek.o nice.o getpriority.o \ qsort.o bsearch.o \ lrand48.o jrand48.o mrand48.o nrand48.o srand48.o seed48.o \ diff --git a/usr/klibc/posix_ope...
2007 Apr 18
0
[Bridge] libbridge<->sysfs interface - some bugs
...25.610075300 +0200 @@ -186,7 +186,7 @@ struct dirent **namelist; char path[SYSFS_PATH_MAX]; - snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/brport", brname); + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/brif", brname); count = scandir(path, &namelist, 0, alphasort); if (count < 0) return old_foreach_port(brname, iterator, arg);
2009 Dec 07
0
Bunch of bugs in LibTheora, FFMPEG2THEORA, PNG2THEORA
...678 snprintf(input_png, 1023,"%s/%s", input_directory, png_files[0]->d_name); 679 if(png_read(input_png, &w, &h, &yuv)) { 680 fprintf(stderr, "could not read %s\n", input_png); 681 exit(1); 682 } here ^^^ ... 146 #ifdef WIN32 147 int 148 alphasort (const void *a, const void *b) 149 { 150 return strcoll ((*(const struct dirent **) a)->d_name, 151 (*(const struct dirent **) b)->d_name); 152 } 153 154 int 155 scandir (const char *dir, struct dirent ***namelist, 156 int (*select)(const struct dirent *), int (*...
2007 Nov 15
1
program I used to test xattrs
...;stdlib.h> #include <string.h> #include <errno.h> #include <dirent.h> #include <unistd.h> static int get_dir_list(char *dir, char ***filelist) { struct dirent **namelist; int n = 0, temp, i = 0, size = 0; struct stat buf; temp = n = scandir(dir, &namelist, NULL, alphasort); if (n < 0) { perror("scandir"); return -1; } if (n == 2) { while (n--) free(namelist[n]); free(namelist); return n; } /* we don't want '.' or '..' */ n -= 2; (*filelist) = (char **) malloc(sizeof(char *) * n); while (temp--) { int size;...
2023 Jan 26
0
[klibc:time64] time: Use clock_* system calls for time-of-day and sleep
....o strtotimeval.o \ raise.o abort.o assert.o alarm.o pause.o \ __signal.o sysv_signal.o bsd_signal.o siglist.o sigabbrev.o \ siglongjmp.o \ @@ -53,7 +54,8 @@ klib-y += vsnprintf.o snprintf.o vsprintf.o sprintf.o \ clearenv.o nullenv.o \ getopt.o getopt_long.o readdir.o scandir.o alphasort.o remove.o \ syslog.o closelog.o pty.o isatty.o reboot.o \ - time.o lseek.o nice.o getpriority.o \ + gettimeofday.o settimeofday.o time.o \ + lseek.o nice.o getpriority.o \ futimesat.o utime.o utimes.o \ qsort.o bsearch.o \ lrand48.o jrand48.o mrand48.o nrand48.o srand48.o see...
2012 Aug 22
5
[PATCH 0/5] trace-cmd: Add a recorder readable feature for virtio-trace
Hi Steven, The following patch set provides a feature which can read trace data of a guest using virtio-trace (https://lkml.org/lkml/2012/8/9/210) for a recorder function of trace-cmd. This patch set depends on the trace-agent running on a guest in the virtio-trace system. To translate raw data of a guest to text data on a host, information of debugfs in the guest is also needed on the host. In
2012 Aug 22
5
[PATCH 0/5] trace-cmd: Add a recorder readable feature for virtio-trace
Hi Steven, The following patch set provides a feature which can read trace data of a guest using virtio-trace (https://lkml.org/lkml/2012/8/9/210) for a recorder function of trace-cmd. This patch set depends on the trace-agent running on a guest in the virtio-trace system. To translate raw data of a guest to text data on a host, information of debugfs in the guest is also needed on the host. In
2016 Aug 20
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...+ return ret; +} + +static ssize_t virtio_pstore_do_open(VirtIOPstore *s) +{ + /* scan all pstore files */ + prefix_idx = 0; + prefix_count = ARRAY_SIZE(virtio_pstore_file_prefix); + + s->file_idx = 0; + s->num_file = scandir(s->directory, &s->files, filter_pstore, alphasort); + + return s->num_file >= 0 ? 0 : -1; +} + +static ssize_t virtio_pstore_do_close(VirtIOPstore *s) +{ + int i; + + for (i = 0; i < s->num_file; i++) { + g_free(s->files[i]); + } + g_free(s->files); + s->files = NULL; + + s->num_file = 0; + re...
2016 Nov 10
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...> + /* scan all pstore files */ > > > + prefix_idx = 0; > > > + prefix_count = ARRAY_SIZE(virtio_pstore_file_prefix); > > > + > > > + s->file_idx = 0; > > > + s->num_file = scandir(s->directory, &s->files, filter_pstore, alphasort); > > > + > > > + return s->num_file >= 0 ? 0 : -1; > > > +} > > > + > > > +static ssize_t virtio_pstore_do_close(VirtIOPstore *s) > > > +{ > > > + int i; > > > + > > > + for (i = 0; i < s->num_fil...