Home | History | Annotate | Download | only in e2fsck

Lines Matching full:ctx

46 void fatal_error(e2fsck_t ctx, const char *msg)
50 if (ctx->fs && ctx->fs->io) {
51 if (ctx->fs->io->magic == EXT2_ET_MAGIC_IO_CHANNEL)
52 io_channel_flush(ctx->fs->io);
56 ctx->flags |= E2F_FLAG_ABORT;
57 if (ctx->flags & E2F_FLAG_SETJMP_OK)
58 longjmp(ctx->abort_loc, 1);
62 void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned int size,
74 fatal_error(ctx, buf);
80 char *string_copy(e2fsck_t ctx EXT2FS_ATTR((unused)),
196 int ask (e2fsck_t ctx, const char * string, int def)
198 if (ctx->options & E2F_OPT_NO) {
202 if (ctx->options & E2F_OPT_YES) {
206 if (ctx->options & E2F_OPT_PREEN) {
213 void e2fsck_read_bitmaps(e2fsck_t ctx)
215 ext2_filsys fs = ctx->fs;
219 if (ctx->invalid_bitmaps) {
220 com_err(ctx->program_name, 0,
222 ctx->device_name);
223 fatal_error(ctx, 0);
230 com_err(ctx->program_name, retval,
232 ctx->device_name);
233 fatal_error(ctx, 0);
237 void e2fsck_write_bitmaps(e2fsck_t ctx)
239 ext2_filsys fs = ctx->fs;
247 com_err(ctx->program_name, retval,
249 ctx->device_name);
250 fatal_error(ctx, 0);
254 void preenhalt(e2fsck_t ctx)
256 ext2_filsys fs = ctx->fs;
258 if (!(ctx->options & E2F_OPT_PREEN))
262 ctx->device_name);
263 ctx->flags |= E2F_FLAG_EXITING;
316 void print_resource_track(e2fsck_t ctx, const char *desc,
327 if ((desc && !(ctx->options & E2F_OPT_TIME2)) ||
328 (!desc && !(ctx->options & E2F_OPT_TIME)))
331 e2fsck_clear_progbar(ctx);
383 void e2fsck_read_inode(e2fsck_t ctx, unsigned long ino,
388 retval = ext2fs_read_inode(ctx->fs, ino, inode);
392 fatal_error(ctx, 0);
396 void e2fsck_read_inode_full(e2fsck_t ctx, unsigned long ino,
402 retval = ext2fs_read_inode_full(ctx->fs, ino, inode, bufsize);
406 fatal_error(ctx, 0);
410 extern void e2fsck_write_inode_full(e2fsck_t ctx, unsigned long ino,
416 retval = ext2fs_write_inode_full(ctx->fs, ino, inode, bufsize);
420 fatal_error(ctx, 0);
424 extern void e2fsck_write_inode(e2fsck_t ctx, unsigned long ino,
429 retval = ext2fs_write_inode(ctx->fs, ino, inode);
433 fatal_error(ctx, 0);
448 blk_t get_backup_sb(e2fsck_t ctx, ext2_filsys fs, const char *name,
460 if (ctx) {
461 ctx->superblock = ret_sb;
462 ctx->blocksize = fs->blocksize;
467 if (ctx) {
468 if (ctx->blocksize) {
469 ret_sb = ctx->blocksize * 8;
470 if (ctx->blocksize == 1024)
472 ctx->superblock = ret_sb;
475 ctx->superblock = ret_sb;
476 ctx->blocksize = 1024;
505 if (ctx) {
506 ctx->superblock = superblock;
507 ctx->blocksize = blocksize;