Ignore:
Timestamp:
Mar 2, 2008, 12:38:35 AM (11 years ago)
Author:
bruno
Message:
  • Remove floppy support from mindi and mondo and adapt docs
  • Align more mindi with the version from stable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mondo/src/mondorestore/mondo-rstr-tools.c

    r1873 r1885  
    23132313    int res = 0;
    23142314    int fd = 0;
    2315     struct floppy_struct fdprms;
    23162315
    23172316    bool try_plan_B;
     
    23482347    log_msg(2, "mountpt = %s; cfg_file=%s", mountpt, cfg_file);
    23492348
    2350     /* Floppy? */
    2351     sprintf(tmp, "mkdir -p %s", mountpt);
    2352     run_program_and_log_output(tmp, FALSE);
    2353     sprintf(tmp, "mkdir -p %s/tmp", bkpinfo->tmpdir);
    2354     run_program_and_log_output(tmp, FALSE);
    2355 
    2356     /* Is there a floppy drive detected */
    2357     fd = open("/dev/fd0u1722", O_RDONLY);
    2358     if (fd > 0) {
    2359         // open OK
    2360         res = ioctl(fd, FDGETPRM, &fdprms);
    2361         if (res >= 0) {
    2362             // media OK to mount
    2363             sprintf(command, "mount /dev/fd0u1722 %s", mountpt);
    2364             res = run_program_and_log_output(command, FALSE);
    2365         } else {
    2366             //skip mount
    2367             res = 1;
    2368         }
    2369     } else {
    2370         fd = open("/dev/fd0H1440", O_RDONLY);
    2371         if (fd > 0) {
    2372             // open OK
    2373             res = ioctl(fd, FDGETPRM, &fdprms);
    2374             if (res >= 0) {
    2375                 // media OK to mount
    2376                 sprintf(command, "mount /dev/fd0H1440 %s", mountpt);
    2377                 res = run_program_and_log_output(command, FALSE);
    2378             } else {
    2379                 //skip mount
    2380                 res = 1;
    2381             }
    2382         }
    2383     }
    2384     if (res) {
    2385         try_plan_B = TRUE;
    2386     } else {
    2387         try_plan_B = TRUE;
    2388         log_msg(2,
    2389                 "Mounted floppy OK but I don't trust it because the archives might contain more up-to-date config file than the floppy does.");
    2390         // NB: If busybox does not support 'mount -o loop' then Plan A WILL NOT WORK.
    2391         log_msg(2, "Processing floppy (plan A?)");
    2392         sprintf(ramdisk_fname, "%s/mindi.rdz", mountpt);
    2393         if (!does_file_exist(ramdisk_fname)) {
    2394             sprintf(ramdisk_fname, "%s/initrd.img", mountpt);
    2395         }
    2396         if (!does_file_exist(ramdisk_fname)) {
    2397             log_msg(2,
    2398                     "Cannot find ramdisk file on mountpoint. Are you sure that's a boot disk in the drive?");
    2399         }
    2400         if (extract_config_file_from_ramdisk(ramdisk_fname, cfg_file, mountlist_file)) {
    2401             log_msg(2,
    2402                     "Warning - failed to extract config file from ramdisk. I think this boot disk is mangled.");
    2403         }
    2404         sprintf(command, "umount %s", mountpt);
    2405         run_program_and_log_output(command, 5);
    2406         unlink(ramdisk_fname);
    2407     }
    24082349    if (!does_file_exist(cfg_file)) {
    24092350        log_msg(2, "gcffa --- we don't have cfg file yet.");
     
    24532394
    24542395            if (!does_file_exist("tmp/mondo-restore.cfg")) {
    2455                 log_to_screen("Cannot find config info on tape/CD/floppy");
     2396                log_to_screen("Cannot find config info on media");
    24562397                return (1);
    24572398            }
Note: See TracChangeset for help on using the changeset viewer.