Displaying 4 results from an estimated 4 matches for "stat_struct".
2013 Oct 03
0
Automatic boot menu?
...elif FILENAME_MAX
+# define PATH_MAX FILENAME_MAX
+# else
+# define PATH_MAX 256
+# endif /* NAME_MAX */
+#endif /* PATH_MAX */
+
+
+#define DIR_METATABLE "directory metatable"
+typedef struct dir_data {
+ int closed;
+ DIR *dir;
+} dir_data;
+
+
+#define STAT_STRUCT struct stat
+#define STAT_FUNC stat_via_fstat
+
+/* Emulate stat via fstat */
+int stat_via_fstat (const char *path, struct stat *buf)
+{
+ int fd = open (path, O_RDONLY);
+ if (fd == -1) {
+ DIR *dir = opendir (path);
+ if (!dir) return -1;
+ closedir (dir);
+ buf->st_mode=S_IFDIR...
2013 Aug 30
2
Automatic boot menu?
"H. Peter Anvin" <hpa at zytor.com> writes:
> On 08/29/2013 04:14 AM, Ferenc Wagner wrote:
>
>> "H. Peter Anvin" <hpa at zytor.com> writes:
>>
>>> On 08/22/2013 10:20 AM, Ferenc Wagner wrote:
>>>
>>>> Now that Syslinux has ls.c32 and lua.c32, it should be possible to build
>>>> a customizable boot menu in
2007 Mar 29
1
exclude based on UID/GID?
...='/shot/*/maya/*' -za --stats -h --numeric-ids
rsync://remote/root/Shows/show/season/episode/
/mnt/root/Shows/show/season/episode/
However this runs the risk of any files created locally during the
length of the first rsync being deleted.
I've read through exclude.c and by passing the STAT_STRUCT around
instead of just the file path, it would be pretty easy to add exclude
flags for UID, GID, size, mtime, etc. Is this a reasonable approach?
Thanks!
2013 Oct 15
23
[PATCH 00/21] Upgrade to Lua 5.2.2, add filesystem module and get_key binding
Hi,
This series targets automatic boot menu generation, but most of it
is the Lua upgrade, because I got tired reading deprecated API docs.
It's mostly a straightforward forward port of the earlier Syslinux
specific changes to Lua 5.1, except that:
* I chose the add a stub getenv() implementation to the COM32 API
instead of #ifdefing out all the references in Lua, and
* I kept oslib