Fix FUSE create()

Fix return code when creating new file
This commit is contained in:
dschmenk 2014-02-04 15:28:36 -08:00
parent 332e8a720f
commit b6b96b96b4
5 changed files with 18 additions and 3 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
a.out
src/gpclk

View File

@ -1,5 +1,5 @@
PACKAGE=a2pi
VERSION=0.1.7
VERSION=0.1.8
DIST=$(PACKAGE)-$(VERSION)
DISTDIR=./$(DIST)

5
debian/changelog vendored
View File

@ -1,3 +1,8 @@
a2pi (0.1.8-0) unstable; urgency=low
* Fix FUSE create file function
-- David Schmenk <dschmenk@gmail.com> Tue, 04 Feb 2014 13:43:53 -0800
a2pi (0.1.7-3) unstable; urgency=low
* Adjust file permissions for FUSE driver to allow group access

View File

@ -1262,7 +1262,7 @@ static int a2pi_create(const char * path, mode_t mode, struct fuse_file_info *fi
{
err = prodos_map_errno(prodos_create(prodos_name, 0xC3, type, aux, 0));
}
if (refnum == 0)
else if (refnum > 0)
{
prodos_set_eof(refnum, 0);
prodos_close(refnum, &io_buff);

View File

@ -99,4 +99,12 @@ void gpclk(int idiv)
release_io(gpio);
release_io(cmgp);
}
#ifndef SETSERCLK
int main(void)
{
/*
* Initialize ACIA clock for Apple II Pi card
*/
gpclk(271); /* divisor for ~1.8 MHz => (500/271) MHz */
}
#endif