delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/05/18/11:34:04

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; q=dns; s=default; b=hy
VSt8TcmuRbfN4TtiRVuH2UtvJke25S5vLukrJUSpyj22iw/m4fEYor5YXBoNbjld
rAtNUivPBx9/wDArgvins1d/eIsetBLZnZbnS7S4cuMiFbN1mGfXS8qn7m97eOpD
rGVgtaUNB2DYdvewLgUDBytywilBCqWAe8Av1X2LQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; s=default; bh=gfjGzGCR
GXYLM9wiheo+QeCz9Mk=; b=qp+fzeg+bXif+YEf3rLkVDBY8j0u4DSFOsNXjbd0
7Mi1Wdea8kPAy/WoB2ny5z0l0BKtlZALd+ZrhodnAtkOh12jsPcolHgKqZ54NwVV
j+RpNEr9HfAfaErKaPULM5ydU2X9OCnWI0hDd11jxmc8IE7GQQ1V8rtAkAMt64nw
gR0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-ig0-f180.google.com
MIME-Version: 1.0
X-Received: by 10.50.43.194 with SMTP id y2mr15096232igl.35.1431963223732; Mon, 18 May 2015 08:33:43 -0700 (PDT)
In-Reply-To: <5559FB9E.3040200@cygwin.com>
References: <CACs=mWDRGh9KZBT45=8yy4J6h62v0RNYxczV91qRhhb8LcfY4Q AT mail DOT gmail DOT com> <5559FB9E DOT 3040200 AT cygwin DOT com>
Date: Mon, 18 May 2015 17:33:43 +0200
Message-ID: <CACs=mWCO8ejvsufP3C_HFAiKDrcsanGZ+J_EuQQGOm+u30T_zg@mail.gmail.com>
Subject: Re: File operations on a Windows Driver (character device)
From: Alessio Faina <alessiofaina AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Ok thanks, I've been able to find the character device under
"/proc/sys/DosDevices/Global/deviceName"; now I'm stuck with the mmap
implementation; when I do mmap in the userland program it returns me
errno 19 (#define ENODEV      19  /* No such device */) obviously because
I haven't set anything in the kernel module; there's a way to make visible a
portion of memory to be used by the mmap in the kernel? The memory is Non Paged
and allocated with a ExAllocatePoolWithTag in 'win terms'.

2015-05-18 16:47 GMT+02:00 Larry Hall (Cygwin)
<reply-to-list-only-lh AT cygwin DOT com>:
> On 05/18/2015 05:42 AM, Alessio Faina wrote:
>>
>> Hello everyone,
>>
>> I'm developing a port of a FreeBSD/Linux application that consists of
>> two parts: a kernel and a user land part.
>> The kernel part is build as a WDM driver and is compiled with VS2013
>> and WDK 8.1: the userspace is going to
>> be compiled under Cygwin for compatibility with user land programs
>> already written for other OSs.
>>
>> My problem is that the user space program invokes Open(), ioctl(),
>> mmap/munmap(), select() and poll().
>>
>> I've build a test Win32 app to open with CreateFile the DosDevice with
>> the "\\\\.\\uniioctl" name and everything goes fine,
>> but I've tried to do the same thing with Open(...) with a lot of
>> variants (\\DosDevice\\uniioctl, \dev\uniioctl....) but I'm
>> unable to open the character device. There is some way to do this?
>
>
> Sorry I can't help with allot of specifics on your questions but I can
> say that when using Cygwin, you are best off if you stick to POSIX syntax
> and semantics and don't mix in Windows code and Windowisms.  That includes
> path separators (i.e. use '/', not '\').  See this page in the User's Guide
> for information on how Cygwin handles device emulation too:
>
> <https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-posixdevices>
>
>
>
> --
> Larry
>
> _____________________________________________________________________
>
> A: Yes.
>> Q: Are you sure?
>>> A: Because it reverses the logical flow of conversation.
>>>> Q: Why is top posting annoying in email?
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019