tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Importing lua(4), but where in the source tree?



In article <DE1AA2EE-2A57-4255-9F6C-84B240596E76%msys.ch@localhost>,
Marc Balmer  <marc%msys.ch@localhost> wrote:
>
>Am 09.01.2013 um 16:28 schrieb matthew green <mrg%eterna.com.au@localhost>:
>
>> 
>>> I want to import the lua(4) device driver, which is currently a
>module only, which seems wrong.
>>> 
>>> Is sys/dev/lua/ a good place?
>> 
>> can you give a little more details on what is included?
>
>Sure. The full diff is at
>http://www.netbsd.org/~mbalmer/diffs/kernel_lua_010.diff and it's the
>files that the diff now places in sys/modules/lua/ that I think should
>better go to sys/dev/lua/
>
>> 
>> at a guess, if there are more than a couple of files
>> then sys/dev/lua is an OK place, otherwise just sys/dev
>> seems reasonable to me.
>
>- Marc
>
>
Fine (with sys/dev/lua), but:

-#define fputs(s, f)    printf(s)
+#define fputs(s, f)    printf("%s", s)

And perhaps:
-#define realloc(ptr, nsize)    kmem_alloc(nsize, KM_SLEEP)
-#define free(ptr)              kmem_free(ptr, osize)
+#define realloc(ptr, nsize)    kern_realloc(ptr, nsize, KM_SLEEP)
+#define free(ptr)              kern_free(ptr)

And:
-char *strncat(char *dst, const char *src, size_t n);
-size_t strspn(const char *s, const char *charset);
-size_t strcspn(const char *s, const char *charset);
-char *strpbrk(const char *s, const char *charset);
+char *strncat(char *, const char *, size_t);
+size_t strspn(const char *, const char *);
+size_t strcspn(const char *, const char *);
+char *strpbrk(const char *, const char *);

And where does the luapmf driver go? in sys/dev/lua/ or sys/dev/lua/pmf?

christos



Home | Main Index | Thread Index | Old Index