Use ya_block_error function in YABAR_DISKSPACE

This commit is contained in:
Jack Henschel 2017-03-21 20:59:53 +01:00
parent 8de12e95e8
commit 0e606d30b0

View file

@ -728,12 +728,8 @@ void ya_int_diskspace(ya_block_t *blk) {
}
endmntent(mntentfile);
if ( mntpntcount == -1 ) {
fprintf(stderr, "no mount points found for prefix \"%s\"\n",
ya_block_error(blk, "no mount points found for prefix \"%s\"",
blk->internal->option[0]);
strncpy(blk->buf, "BLOCK ERROR!", strlen("BLOCK ERROR!"));
ya_draw_pango_text(blk);
pthread_detach(blk->thread);
pthread_exit(NULL);
}
uint64_t free, total;
struct statvfs stat;