From 22e336c7003d85450919e2012fc720881fd8a511 Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Sun, 14 May 2017 12:35:46 +0200 Subject: [PATCH 1/2] Should fix Issue #17. --- src/dvtm03.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dvtm03.c b/src/dvtm03.c index b6cf110..2afa7a4 100644 --- a/src/dvtm03.c +++ b/src/dvtm03.c @@ -300,8 +300,8 @@ tm03_conf(FILE *f, char *s, struct tmdev *tm) tm->tm_typ = TM_DTTM03; /* Say formatter is TM03 for now */ tm->tm_styp = TM_DT45; /* Say slave is TU45 for now */ TMREG(tm, RHR_SN) = /* Serial Number register (BCD) */ - (((9 / 1000)%10) << 12) - | (((9 / 100)%10) << 8) + (((9900 / 1000)%10) << 12) + | (((9900 / 100)%10) << 8) | (((ntms / 10)%10) << 4) | (((ntms )%10) ); #if KLH10_DEV_DPTM03 From b60c1e88a26fd4c40a4f75fb9e314ce50a179797 Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Sun, 14 May 2017 13:10:33 +0200 Subject: [PATCH 2/2] And in the other file. Should work for n < 100. --- src/dvrpxx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dvrpxx.c b/src/dvrpxx.c index d935e1f..72c00fc 100644 --- a/src/dvrpxx.c +++ b/src/dvrpxx.c @@ -287,8 +287,8 @@ rp_conf(FILE *f, char *s, struct rpdev *rp) rp->rp_iswrite = TRUE; partyp(rp, DVRP_DEFAULT_DISK); /* Default disk config */ RPREG(rp, RHR_SN) = /* Serial Number register (BCD) */ - (((1 / 1000)%10) << 12) - | (((6 / 100)%10) << 8) + (((1600 / 1000)%10) << 12) + | (((1600 / 100)%10) << 8) | (((nrps / 10)%10) << 4) | (((nrps )%10) ); rp->rp_bufsec = 4; /* # sectors in buffer */