The e2fsck_global_ctx varible was only being set if HAVE_SIGNAL_H is
defined. There are systems, such as Android, where this is not true.
This was causing e2fsck_set_bitmap_type() to seg fault since
e2fsck_global_ctx was not NULL.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: JP Abgrall <jpa@google.com>
return retval;
*ret_ctx = ctx;
+ e2fsck_global_ctx = ctx;
setvbuf(stdout, NULL, _IONBF, BUFSIZ);
setvbuf(stderr, NULL, _IONBF, BUFSIZ);
#ifdef SA_RESTART
sa.sa_flags = SA_RESTART;
#endif
- e2fsck_global_ctx = ctx;
sa.sa_handler = signal_progress_on;
sigaction(SIGUSR1, &sa, 0);
sa.sa_handler = signal_progress_off;