info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mtools] mformat with -C option under Cygwin


From: Eugene Kotlyarov
Subject: [mtools] mformat with -C option under Cygwin
Date: Tue, 20 Apr 2004 20:53:37 +0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040316 MultiZilla/1.5.0.4d

Hi.

I've found that -C option in mformat don't work under Cygwin, I think there is some incompatibilty with flock function, after locking it can't write to file. Here is a small patch that fixes it.

*** plain_io.c.orig     Mon Apr 19 23:54:42 2004
--- plain_io.c  Mon Apr 19 22:19:57 2004
***************
*** 644,649 ****
--- 644,650 ----
                return NULL;
        }
  #ifndef __EMX__
+ #ifndef __CYGWIN__
        /* lock the device on writes */
        if (locked && lock_dev(This->fd, mode == O_RDWR, dev)) {
                if(errmsg)
***************
*** 663,668 ****
--- 664,670 ----
                return NULL;
        }
  #endif
+ #endif
        /* set default parameters, if needed */
        if (dev){               
                if ((!IS_MFORMAT_ONLY(dev) && dev->tracks) &&


reply via email to

[Prev in Thread] Current Thread [Next in Thread]