FreeBSD Bugzilla – Attachment 253915 Details for
Bug 281781
sysutils/copytape: errno fixes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
errno patch
0002-sysutils-copytape-include-errno.h-for-errno.patch (text/plain), 2.87 KB, created by
Brooks Davis
on 2024-09-30 22:22:24 UTC
(
hide
)
Description:
errno patch
Filename:
MIME Type:
Creator:
Brooks Davis
Created:
2024-09-30 22:22:24 UTC
Size:
2.87 KB
patch
obsolete
>From a082636e0d65d37e5a6b2401e4438d22764b392a Mon Sep 17 00:00:00 2001 >From: Brooks Davis <brooks@FreeBSD.org> >Date: Mon, 30 Sep 2024 16:56:09 +0100 >Subject: [PATCH 2/8] sysutils/copytape: include errno.h for errno > >errno must be accessed by a macro from errno.h. > >Tidy includes and add unistd.h for read/write. > >Consolidate patches for easy of maintenance. > >This code is borderline useless and certainly broken with modern tape >sizes due to the use of ints for sizes. >--- > sysutils/copytape/Makefile | 2 +- > .../{patch-copytape.c_1 => patch-copytape.c} | 23 +++++++++++++++---- > sysutils/copytape/files/patch-copytape.c_2 | 11 --------- > 3 files changed, 19 insertions(+), 17 deletions(-) > rename sysutils/copytape/files/{patch-copytape.c_1 => patch-copytape.c} (59%) > delete mode 100644 sysutils/copytape/files/patch-copytape.c_2 > >diff --git a/sysutils/copytape/Makefile b/sysutils/copytape/Makefile >index ede11c03c22a..c2ad2ab39f43 100644 >--- a/sysutils/copytape/Makefile >+++ b/sysutils/copytape/Makefile >@@ -1,6 +1,6 @@ > PORTNAME= copytape > PORTVERSION= 1.0 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= sysutils > MASTER_SITES= COMP_SOURCES/unix/volume10 > DISTNAME= copytape >diff --git a/sysutils/copytape/files/patch-copytape.c_1 b/sysutils/copytape/files/patch-copytape.c >similarity index 59% >rename from sysutils/copytape/files/patch-copytape.c_1 >rename to sysutils/copytape/files/patch-copytape.c >index 0be1bdc8d526..8dc9a0708c88 100644 >--- a/sysutils/copytape/files/patch-copytape.c_1 >+++ b/sysutils/copytape/files/patch-copytape.c >@@ -1,15 +1,28 @@ >---- copytape.c.orig Fri Oct 23 17:23:06 1998 >-+++ copytape.c Fri Oct 23 17:23:46 1998 >-@@ -36,7 +36,7 @@ >+--- copytape.c.orig >++++ copytape.c >+@@ -28,15 +28,18 @@ >+ */ > >- extern int errno; >+ >+-#include <stdio.h> >+ #include <sys/types.h> >+ #include <sys/ioctl.h> >+ #include <sys/mtio.h> >+ #include <sys/file.h> >+ >+-extern int errno; >++#include <errno.h> >++#include <stdio.h> >++#include <stdlib.h> >++#include <string.h> >++#include <unistd.h> > > -#define BUFLEN 262144 /* max tape block size */ > +#define BUFLEN (1024*1024) /* max tape block size */ > #define TAPE_MARK -100 /* return record length if we read a > * tape mark */ > #define END_OF_TAPE -101 /* 2 consecutive tape marks */ >-@@ -149,7 +149,7 @@ >+@@ -149,7 +152,7 @@ > len = input(from); > } while (len > 0); > if (len == FORMAT_ERROR) { >diff --git a/sysutils/copytape/files/patch-copytape.c_2 b/sysutils/copytape/files/patch-copytape.c_2 >deleted file mode 100644 >index 8838843a4939..000000000000 >--- a/sysutils/copytape/files/patch-copytape.c_2 >+++ /dev/null >@@ -1,11 +0,0 @@ >---- copytape.c.orig 2013-10-16 06:54:00.000000000 -0400 >-+++ copytape.c 2013-10-16 06:54:13.000000000 -0400 >-@@ -29,6 +29,8 @@ >- >- >- #include <stdio.h> >-+#include <stdlib.h> >-+#include <string.h> >- #include <sys/types.h> >- #include <sys/ioctl.h> >- #include <sys/mtio.h> >-- >2.45.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 281781
: 253915