aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lfs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lfs.c b/src/lfs.c
index 6979820..f52fecc 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -15,7 +15,7 @@
15** lfs.touch (filepath [, atime [, mtime]]) 15** lfs.touch (filepath [, atime [, mtime]])
16** lfs.unlock (fh) 16** lfs.unlock (fh)
17** 17**
18** $Id: lfs.c,v 1.45 2008/01/16 22:33:24 mascarenhas Exp $ 18** $Id: lfs.c,v 1.46 2008/01/25 17:09:56 mascarenhas Exp $
19*/ 19*/
20 20
21#include <errno.h> 21#include <errno.h>
@@ -525,6 +525,9 @@ static void push_st_blksize (lua_State *L, struct stat *info) {
525 lua_pushnumber (L, (lua_Number)info->st_blksize); 525 lua_pushnumber (L, (lua_Number)info->st_blksize);
526} 526}
527#endif 527#endif
528static void push_invalid (lua_State *L, struct stat *info) {
529 luaL_error(L, "invalid attribute name");
530}
528 531
529typedef void (*_push_function) (lua_State *L, struct stat *info); 532typedef void (*_push_function) (lua_State *L, struct stat *info);
530 533
@@ -549,7 +552,7 @@ struct _stat_members members[] = {
549 { "blocks", push_st_blocks }, 552 { "blocks", push_st_blocks },
550 { "blksize", push_st_blksize }, 553 { "blksize", push_st_blksize },
551#endif 554#endif
552 { NULL, NULL } 555 { NULL, push_invalid }
553}; 556};
554 557
555/* 558/*