The original idea was similar to mail_storage_set_error/critical()
separation. But in storage they are used to clearly separate between
errors caused by untrusted users vs internal errors. In lib-fs case
all the errors are internal errors. Also all the lib-fs callers are
supposed to log the errors unless they decide to handle them specially,
so there's really no need a fs_set_critical() that just causes them to
be logged twice.
void fs_class_register(const struct fs *fs_class);
void fs_set_error(struct fs *fs, const char *fmt, ...) ATTR_FORMAT(2, 3);
-void fs_set_critical(struct fs *fs, const char *fmt, ...) ATTR_FORMAT(2, 3);
void fs_set_error_async(struct fs *fs);
va_end(args);
}
-void fs_set_critical(struct fs *fs, const char *fmt, ...)
-{
- va_list args;
-
- va_start(args, fmt);
- fs_set_verror(fs, fmt, args);
-
- e_error(fs->event, "%s", fs_last_error(fs));
- va_end(args);
-}
-
void fs_set_error_async(struct fs *fs)
{
fs_set_error(fs, "Asynchronous operation in progress");