fdflush-1.0.1.3build1/0000775000000000000000000000000011043434514011275 5ustar fdflush-1.0.1.3build1/fdflush.80000664000000000000000000000270707732544670013046 0ustar .\" Copyright (C) 1995 Bruce Perens .\" This is free software under the GNU General Public License. .TH FDFLUSH 8 "Debian Utilities" "Debian" .SH NAME fdflush \- force floppy disk drive to detect disk change .SH SYNOPSIS .B fdflush [device] .SH DESCRIPTION .B Fdflush is a band-aid for a common PC hardware problem. Many PC floppy disk drives can't detect when the disk has been changed. The symptom of this problem is that when a disk is changed, the drive will continue to read buffered data from the previous disk rather than new data from the disk presently in the drive. Running .I fdflush makes the system believe the disk-change switch has been actuated, and the system discards the buffered blocks in response to this information. If you have one of these slightly-broken disk drives, you'll have to run .I fdflush every time you change a disk. .PP The kernel uses two different ioctl commands to flush buffers. One's generic (BLKFLSBUF), one's floppy-specific (FDFLUSH). .I fdflush calls both, and only reports an error if noth fail. .SH OPTIONS .TP .I device The name of the floppy disk device, in the form .I /dev/fd1 . The default is .I /dev/fd0 . .SH "EXIT CODES" Zero: success, one: ioctl error, two: inability to open the floppy (or other) device, three: usage error. .SH BUGS They're in your hardware. Try swapping in another floppy drive to see if this problem goes away. .SH FILES /dev/fd\fIN\fR floppy disk device. .SH AUTHOR Bruce Perens .I Bruce@Pixar.com . fdflush-1.0.1.3build1/debian/0000775000000000000000000000000013260671012012516 5ustar fdflush-1.0.1.3build1/debian/rules0000775000000000000000000000161310644330412013576 0ustar #!/usr/bin/make -f # This file is public domain software, originally written by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif build: build-stamp build-stamp: dh_testdir $(MAKE) CFLAGS="$(CFLAGS)" touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp $(MAKE) distclean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) DESTDIR=$(CURDIR)/debian/fdflush install binary-indep: build install binary-arch: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installman dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install fdflush-1.0.1.3build1/debian/changelog0000664000000000000000000001313613260671012014374 0ustar fdflush (1.0.1.3build1) bionic; urgency=high * No change rebuild to pick up -fPIE compiler default -- Balint Reczey Tue, 03 Apr 2018 12:22:34 +0000 fdflush (1.0.1.3) unstable; urgency=low * New maintainer. Closes: #429468 * Conforms to Standards version 3.8.0. -- Diego Fernández Durán Mon, 28 Jul 2008 23:41:33 +0200 fdflush (1.0.1.2) unstable; urgency=low * QA upload. * Package is orphaned (#429468); set maintainer to Debian QA Group. * Switch to debhelper. * Fix typo in description. Closes: #363405. * Conforms to Standards version 3.7.2. -- Matej Vela Mon, 09 Jul 2007 05:45:25 +0200 fdflush (1.0.1.1) unstable; urgency=low * Convert to native version numbering scheme - it always was a native package anyway... - the last update should have been a version uptick anyway * Change Architecture: to "any". - Closes: #252774 -- Matthias Urlichs Sat, 5 Jun 2004 06:51:54 +0200 fdflush (1.0.1-11) unstable; urgency=low * Updated maintainer email. * Directly specify ioctl number; don't require kernel headers. * Exit code now depends on type of failure. * Use both ioctls (BLKFLSBUF and FDFLUSH) for safety. * Try to open the device read/write first. * Updated Standards-Version: to 3.6.1 (no changes). -- Smurf Fri, 19 Sep 2003 11:00:48 +0200 fdflush (1.0.1-10) unstable; urgency=low * Replace "drivers" => "drives" in the package description (closes: #146822) -- Matthias Urlichs 30 Mar 2003 09:01:01 +0200 fdflush (1.0.1-9) unstable; urgency=low * Use prototypes for strerror() and ioctl() (closes: #124355) -- Matthias Urlichs 30 Mar 2003 08:57:04 +0200 fdflush (1.0.1-8) unstable; urgency=low * New maintainer (closes: #170920) -- Matthias Urlichs 30 Mar 2003 08:56:51 +0200 fdflush (1.0.1-7) unstable; urgency=low * Change section to utils * Make up for not making an upload last year by doing a second one this year -- Wichert Akkerman Fri, 10 May 2002 18:21:55 +0200 fdflush (1.0.1-6) frozen unstable; urgency=low * Change priority to optional. Closes: Bug#143160 -- Wichert Akkerman Fri, 10 May 2002 17:45:39 +0200 fdflush (1.0.1-5) frozen unstable; urgency=low * Don't bother to mention NMU which was made 2 days after the bugreport * Include documentation and copyright. Closes: Bug# 63089 * Add -isp to dpkg-gencontrol call (lintian nitpick) * Update location of GPL in copyright -- Wichert Akkerman Mon, 1 May 2000 15:50:17 +0200 fdflush (1.0.1-4) unstable; urgency=low * Add alpha to architecture-list, Closes: Bug# 43176 -- Wichert Akkerman Sun, 14 Nov 1999 23:26:36 +0100 fdflush (1.0.1-3) unstable; urgency=low * Fix FHS-errors * Clean up debian/rules and de-debhelperize it in the process -- Wichert Akkerman Wed, 8 Sep 1999 02:33:47 +0200 fdflush (1.0.1-2) unstable; urgency=low * Rebuild with a FHS-compliant debhelper -- Wichert Akkerman Wed, 8 Sep 1999 01:22:11 +0200 fdflush (1.0.1-1) unstable; urgency=low * Re-uploaded 1.0.1-1 (within a minute, shouldn't be a problem :) * Fix section-number in manpage * Bump version-number to reflect changes in Makefile * Rename manpage to fdflush.8 in source * Fix install-paths in Makefile * Switch to FHS-paths * Update standards-version to 3.0.0 * Close filehandle -- Wichert Akkerman Sun, 18 Jul 1999 22:13:18 +0200 fdflush (1.0.0-13) unstable; urgency=low * Some cleanups in debian/rules * Fix layout of manpage * Update standards-version to 2.5.0 -- Wichert Akkerman Tue, 4 May 1999 01:41:38 +0200 fdflush (1.0.0-12) unstable; urgency=low * Fixed extended description (lintian) * Refer to correct GPL (lintian) -- Wichert Akkerman Sun, 15 Mar 1998 23:11:59 +0100 fdflush (1.0.0-11) unstable; urgency=low * Made architecture i386 -- Wichert Akkerman Tue, 7 Oct 1997 23:53:12 +0200 fdflush (1.0.0-10) unstable; urgency=low * Install correct md5sums (Bug# 13364) * Routine update of debian/rules -- Wichert Akkerman Tue, 30 Sep 1997 18:26:12 +0200 fdflush (1.0.0-9) unstable; urgency=low * libc6 / glibc2 build (Bug# 11678) -- Wichert Akkerman Fri, 1 Aug 1997 00:52:01 +0200 fdflush (1.0.0-8) unstable; urgency=low * Added dependencies to control file for libc * Added md5sums to .deb file -- Wichert Akkerman Mon, 14 Jul 1997 01:16:03 +0200 fdflush (1.0.0-7) unstable frozen; urgency=low * Small path to fix compilation problems for alpha (Bug#8753) -- Wichert Akkerman Wed, 16 Apr 1997 10:37:32 +0200 fdflush (1.0.0-6) unstable; urgency=LOW * Now conforms the policy manual version 2.1.2.2 * Added included to fdflush.c (Bug# 7662) -- Wichert Akkerman Thu, 27 Feb 1997 02:24:47 +0100 fdflush (1.0.0-5) frozen unstable; urgency=LOW * Compress manpages -- Wichert Akkerman Tue, 12 Nov 1996 21:30:11 +0100 fdflush (1.0.0-4) stable unstable; urgency=LOW * Moved to new packaging format -- Wichert Akkerman Tue, 24 Sep 1995 23:55:14 +0200 fdflush (1.0.0-3); priority=LOW * Revamped debian files * new maintainer Wichert Akkerman -- Wichert Akkerman ,Mon Jul 29 18:38:06 MET DST 1996 fdflush-1.0.1.3build1/debian/control0000664000000000000000000000176713260671012014134 0ustar Source: fdflush Section: utils Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Diego Fernández Durán Standards-Version: 3.8.0 Build-Depends: debhelper (>= 5) Package: fdflush Architecture: any Depends: ${shlibs:Depends} Description: Flush out-of-date disk buffers fdflush is a band-aid for floppy (or other) drives with bad disk-change sensing. fdflush makes the system believe the disk-change switch has been triggered forcing the system to discard the buffered data. . If you have one of these slightly-broken disk drives, you'll have to run fdflush every time you change a disk. . fdflush is useful for computers which might be sleeping when you change floppies or other removable media. . The command "floppycontrol -f" does the same thing, but the fdutils package is significantly larger; it only uses the floppy-specific flush ioctl. . The command "blockdev --flushbufs" only uses the generic flush ioctl. fdflush-1.0.1.3build1/debian/compat0000664000000000000000000000000210644330364013721 0ustar 5 fdflush-1.0.1.3build1/debian/copyright0000664000000000000000000000205707641601061014460 0ustar This is the Debian GNU/Linux prepackaged version of the fdflush floppy disk buffer-flush program. Fdflush was written by Bruce Perens . Wichert Akkerman was the previous Debian maintainer of fdflush; the current maintainer is Matthias Urlichs . This package was put together by Bruce Perens , from sources he created. Fdflush is Copyright (C) 1995 Bruce Perens. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. See ChangeLog for information on changes. fdflush-1.0.1.3build1/fdflush.c0000664000000000000000000000215307732544670013114 0ustar /* * Floppy-disk buffer flush program. * Copyright (C) 1995 Bruce Perens * This program is free software under the GNU General Public License */ #include #include #include #include #include #include #include /* Two ways to flush stuff. */ #define BLKFLSBUF _IO(0x12,97) /* linux/fs.h */ #define FDFLUSH _IO(2,0x4b) /* linux/fd.h */ static const char fd0[] = "/dev/fd0"; int main(int argc, char * * argv) { const char * floppy = fd0; int fd; int res; if ( argc == 2 ) floppy = argv[1]; else if ( argc > 2 ) { fprintf(stderr, "usage: fdflush [device]\n"); return 3; } /* Try to open read/write first */ fd = open(floppy, O_RDWR); if (fd < 0) fd = open(floppy, O_RDONLY); if ( fd < 0 ) { fprintf(stderr, "%s: %s.\n", floppy, strerror(errno)); return 2; } /* Only report an error if both ioctl calls fail. */ res = ioctl(fd, FDFLUSH, 0); if ( ioctl(fd, BLKFLSBUF, 0) != 0 && res != 0) { fprintf(stderr, "%s: fdflush: %s.\n", floppy, strerror(errno)); close(fd); return 1; } close(fd); return 0; } fdflush-1.0.1.3build1/Makefile0000664000000000000000000000047010644330454012742 0ustar bindir=/bin mandir=/usr/share/man fdflush: fdflush.o $(CC) $(CFLAGS) $(LDFLAGS) -o fdflush $< install: fdflush fdflush.8 install -D -o root -g root -m 755 fdflush $(DESTDIR)$(bindir)/fdflush install -D -o root -g root -m 644 fdflush.8 $(DESTDIR)$(mandir)/man8/fdflush.8 clean distclean: rm -f fdflush *.o