projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix link to gitweb on the main page.
[paraslash.git]
/
blob.c
diff --git
a/blob.c
b/blob.c
index 3539453ec0e5a174e0e962ae3b84946e4f837f25..8675ee73330fb1f87a1f4ef0a2780b445a2a7b5b 100644
(file)
--- a/
blob.c
+++ b/
blob.c
@@
-54,7
+54,9
@@
enum blob_ls_flags {
/** Structure passed to the \p print_blob function. */
struct lsblob_action_data {
/** Structure passed to the \p print_blob function. */
struct lsblob_action_data {
+ /* The flags given at the command line. */
uint32_t flags;
uint32_t flags;
+ /** Message buffer. */
struct para_buffer pb;
};
struct para_buffer pb;
};
@@
-98,9
+100,9
@@
static int com_lsblob_callback(struct osl_table *table,
if (lbad.flags & BLOB_LS_FLAG_REVERSE)
pmd.pm_flags |= PM_REVERSE_LOOP;
if (!(lbad.flags & BLOB_LS_FLAG_SORT_BY_ID))
if (lbad.flags & BLOB_LS_FLAG_REVERSE)
pmd.pm_flags |= PM_REVERSE_LOOP;
if (!(lbad.flags & BLOB_LS_FLAG_SORT_BY_ID))
- pmd.loop_col_num = BLOBCOL_ID;
- else
pmd.loop_col_num = BLOBCOL_NAME;
pmd.loop_col_num = BLOBCOL_NAME;
+ else
+ pmd.loop_col_num = BLOBCOL_ID;
ret = for_each_matching_row(&pmd);
if (ret < 0)
para_printf(&lbad.pb, "%s\n", PARA_STRERROR(-ret));
ret = for_each_matching_row(&pmd);
if (ret < 0)
para_printf(&lbad.pb, "%s\n", PARA_STRERROR(-ret));
@@
-205,8
+207,11
@@
static int com_catblob(callback_function *f, int fd, int argc,
return ret;
}
return ret;
}
+/** Used for removing rows from a blob table. */
struct rmblob_data {
struct rmblob_data {
+ /** Message buffer. */
struct para_buffer pb;
struct para_buffer pb;
+ /** Number of removed blobs. */
unsigned num_removed;
};
unsigned num_removed;
};
@@
-534,6
+539,7
@@
static int blob_open(struct osl_table **table,
t->close = table_name ## _close; \
t->create = table_name ## _create;\
t->event_handler = table_name ##_event_handler; \
t->close = table_name ## _close; \
t->create = table_name ## _create;\
t->event_handler = table_name ##_event_handler; \
+ table_name ## _table = NULL; \
}
}