aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/dist.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/sysinstall/dist.c')
-rw-r--r--usr.sbin/sysinstall/dist.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c
index 7bd3795f12b3..7d05dc5ae985 100644
--- a/usr.sbin/sysinstall/dist.c
+++ b/usr.sbin/sysinstall/dist.c
@@ -345,6 +345,10 @@ static void
media_timeout(int sig)
{
AlarmWentOff = TRUE;
+ if (sig != SIGINT)
+ msgDebug("A media timeout occurred.\n");
+ else
+ msgDebug("User generated interrupt.\n");
}
static Boolean
@@ -409,7 +413,7 @@ distExtract(char *parent, Distribution *me)
new.sa_mask = 0;
sigaction(SIGINT, &new, &old);
- alarm_set(MEDIA_TIMEOUT, media_timeout);
+ alarm_set(mediaTimeout(), media_timeout);
status = attr_parse(dist_attr, fp);
alarm_clear();
sigaction(SIGINT, &old, NULL); /* Restore signal handler */
@@ -494,7 +498,7 @@ distExtract(char *parent, Distribution *me)
while (1) {
int seconds;
- alarm_set(MEDIA_TIMEOUT, media_timeout);
+ alarm_set(mediaTimeout(), media_timeout);
n = fread(buf, 1, BUFSIZ, fp);
alarm_clear();
if (n <= 0 || AlarmWentOff) {