{
GTimeVal t;
g_get_current_time(&t);
- return t.tv_sec * 1000000 + t.tv_usec;
+ return (int64_t)t.tv_sec * 1000000 + t.tv_usec;
}
/* Unfortunately a glib hash table is only guaranteed to be able to store
printf("BlueSkyFS starting...\n");
+ printf(" time = %lld\n", bluesky_get_current_time());
+
BlueSkyInode *root = bluesky_new_inode(1, BLUESKY_DIRECTORY);
bluesky_directory_insert(root, "foo", 2);
PACKAGES=glib-2.0 gthread-2.0
DEBUG=-g
-CFLAGS=-O -Wall -D_FILE_OFFSET_BITS=64 $(DEBUG) -I.. \
+CFLAGS=-Wall -D_FILE_OFFSET_BITS=64 $(DEBUG) -I.. \
$(shell pkg-config --cflags $(PACKAGES))
LDFLAGS=$(DEBUG) $(shell pkg-config --libs $(PACKAGES))
file = bluesky_new_inode(bluesky_fs_alloc_inode(fs), BLUESKY_REGULAR);
file->nlink = 1;
file->mode = 0755;
+ int64_t time = bluesky_get_current_time();
+ printf("time: %lld\n", time);
+ file->mtime = time;
+ file->ctime = time;
+ file->atime = time;
bluesky_insert_inode(fs, file);
bluesky_directory_insert(dir, argp->where.name, file->inum);