Deleted Added
full compact
floppy.c (8825) floppy.c (8837)
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last attempt in the `sysinstall' line, the next
5 * generation being slated to essentially a complete rewrite.
6 *
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last attempt in the `sysinstall' line, the next
5 * generation being slated to essentially a complete rewrite.
6 *
7 * $Id: floppy.c,v 1.3 1995/05/28 03:04:56 jkh Exp $
7 * $Id: floppy.c,v 1.4 1995/05/29 00:50:01 jkh Exp $
8 *
9 * Copyright (c) 1995
10 * Jordan Hubbard. All rights reserved.
11 * Copyright (c) 1995
12 * Gary J Palmer. All rights reserved.
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions

--- 121 unchanged lines hidden (view full) ---

137}
138
139int
140mediaGetFloppy(char *file)
141{
142 char buf[PATH_MAX];
143
144 snprintf(buf, PATH_MAX, "/mnt/%s", file);
8 *
9 * Copyright (c) 1995
10 * Jordan Hubbard. All rights reserved.
11 * Copyright (c) 1995
12 * Gary J Palmer. All rights reserved.
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions

--- 121 unchanged lines hidden (view full) ---

137}
138
139int
140mediaGetFloppy(char *file)
141{
142 char buf[PATH_MAX];
143
144 snprintf(buf, PATH_MAX, "/mnt/%s", file);
145
146 return open(buf, O_RDONLY);
147}
148
149void
150mediaShutdownFloppy(Device *dev)
151{
152 if (floppyMounted) {
153 if (unmount("/mnt", 0) != 0)
154 msgDebug("Umount of floppy on /mnt failed: %s (%d)\n", strerror(errno), errno);
155 else {
156 floppyMounted = FALSE;
157 msgConfirm("You may remove the floppy from %s", dev->description);
158 }
159 }
160}
145 return open(buf, O_RDONLY);
146}
147
148void
149mediaShutdownFloppy(Device *dev)
150{
151 if (floppyMounted) {
152 if (unmount("/mnt", 0) != 0)
153 msgDebug("Umount of floppy on /mnt failed: %s (%d)\n", strerror(errno), errno);
154 else {
155 floppyMounted = FALSE;
156 msgConfirm("You may remove the floppy from %s", dev->description);
157 }
158 }
159}