*/
#include <stdint.h>
+#include <inttypes.h>
#include <glib.h>
#include "bluesky.h"
while (!g_sequence_iter_is_end(i)) {
BlueSkyDirent *d = g_sequence_get(i);
- g_print(" 0x%08x [inum=%lld] %s\n", d->cookie, d->inum, d->name);
+ g_print(" 0x%08x [inum=%"PRIu64"] %s\n",
+ d->cookie, d->inum, d->name);
i = g_sequence_iter_next(i);
}
}
#include <stdio.h>
#include <stdint.h>
+#include <inttypes.h>
#include <glib.h>
#include <string.h>
void bluesky_inode_unref(BlueSkyInode *inode)
{
if (g_atomic_int_dec_and_test(&inode->refcount)) {
- g_error("Reference count for inode %lld dropped to zero!\n",
+ g_error("Reference count for inode %"PRIu64" dropped to zero!\n",
inode->inum);
}
}
BlueSkyRCStr *data = bluesky_string_new(g_string_free(buf, FALSE), len);
char key[64];
- sprintf(key, "inode-%016llx", inode->inum);
+ sprintf(key, "inode-%016"PRIx64, inode->inum);
bluesky_store_put(fs->store, key, data);
}
void bluesky_inode_fetch(BlueSkyFS *fs, uint64_t inum)
{
char key[64];
- sprintf(key, "inode-%016llx", inum);
+ sprintf(key, "inode-%016"PRIx64, inum);
BlueSkyRCStr *data = bluesky_store_get(fs->store, key);
if (data == NULL)
return;
BlueSkyInode *inode = bluesky_deserialize_inode(fs, data->data);
if (inode != NULL) {
bluesky_insert_inode(fs, inode);
- g_print("Loaded inode %lld\n", (long long)inum);
+ g_print("Loaded inode %"PRIu64"\n", inum);
}
}
#include <stdio.h>
#include <stdlib.h>
+#include <inttypes.h>
#include <stdint.h>
#include <glib.h>
printf("BlueSkyFS starting...\n");
- printf(" time = %lld\n", bluesky_get_current_time());
+ printf(" time = %"PRIi64"\n", bluesky_get_current_time());
BlueSkyFS *fs = bluesky_new_fs("export");
*/
#include <stdint.h>
+#include <inttypes.h>
#include <glib.h>
#include <string.h>
bluesky_dirent_compare, NULL);
g_hash_table_insert(inode->dirhash, dirent->name, dirent);
- g_print(" dirent[%08x]: %s -> %lld\n",
+ g_print(" dirent[%08x]: %s -> %"PRIu64"\n",
dirent->cookie, dirent->name, dirent->inum);
buf = strchr(d->name, '\0') + 1;
file->nlink = 1;
file->mode = 0755;
int64_t time = bluesky_get_current_time();
- printf("time: %lld\n", time);
+ printf("time: %"PRIi64"\n", time);
file->mtime = time;
file->ctime = time;
file->atime = time;