<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how open a file in Kernel Space in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-open-a-file-in-kernel-space/m-p/4477929#M652633</link>
    <description>In /usr/include/sys/vnode.h&lt;BR /&gt;&lt;BR /&gt;has the function vn_open, but there is no man page for it.&lt;BR /&gt;&lt;BR /&gt;extern int vn_open __((char *, int, int, int, int, struct vnode **));&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;what are four int type parameters?&lt;BR /&gt;(char *pnamep, int seg, int filemode, int createmode, int plainmode, stru&lt;BR /&gt;ct vnode **vpp)&lt;BR /&gt;&lt;BR /&gt;just a remark, you can also open it at user level, and use it from kernel.&lt;BR /&gt;&lt;BR /&gt;filemode being FREAD|FWRITE|....FCREAT...&lt;BR /&gt;plainmode and createmode are used only when FCREAT is used&lt;BR /&gt;&lt;BR /&gt;vn_rdwr(enum uio_rw rw, struct vnode *vp, char *base, size_t len, k_off_t offset, int seg, int ioflag, long *aresid, int fpflags)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;but basically is it often more confortable and less problematic to have a user level daemon which read() from your device the messages to log and log them from user level;&lt;BR /&gt;The risk is much less than making that sort of thing from the kernel, due to the fact for instance that kernel is not preemtable,&lt;BR /&gt;&lt;BR /&gt;for instance nettl is doing this that way.&lt;BR /&gt;ntl_reader running at rt prio is logging the nettl traces and logs.&lt;BR /&gt;So my advice is use a user level daemon to log to a file. it will work more easily with no risk&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 17 Aug 2009 10:04:22 GMT</pubDate>
    <dc:creator>Laurent Menase</dc:creator>
    <dc:date>2009-08-17T10:04:22Z</dc:date>
    <item>
      <title>how open a file in Kernel Space</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-open-a-file-in-kernel-space/m-p/4477925#M652629</link>
      <description>Is there any interface for opening a file in a kernel module, such as aix's vn_open,vn_rdwr&lt;BR /&gt;&lt;BR /&gt;how open a file in Kernel Space?</description>
      <pubDate>Wed, 12 Aug 2009 09:37:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-open-a-file-in-kernel-space/m-p/4477925#M652629</guid>
      <dc:creator>kaijile</dc:creator>
      <dc:date>2009-08-12T09:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: how open a file in Kernel Space</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-open-a-file-in-kernel-space/m-p/4477926#M652630</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;What are you trying to do?&lt;BR /&gt;&lt;BR /&gt;Jov</description>
      <pubDate>Wed, 12 Aug 2009 10:52:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-open-a-file-in-kernel-space/m-p/4477926#M652630</guid>
      <dc:creator>Jov</dc:creator>
      <dc:date>2009-08-12T10:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: how open a file in Kernel Space</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-open-a-file-in-kernel-space/m-p/4477927#M652631</link>
      <description>I want to write log in my dlkm.</description>
      <pubDate>Wed, 12 Aug 2009 13:48:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-open-a-file-in-kernel-space/m-p/4477927#M652631</guid>
      <dc:creator>kaijile</dc:creator>
      <dc:date>2009-08-12T13:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: how open a file in Kernel Space</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-open-a-file-in-kernel-space/m-p/4477928#M652632</link>
      <description>In /usr/include/sys/vnode.h&lt;BR /&gt;&lt;BR /&gt;has the function vn_open, but there is no man page for it.&lt;BR /&gt;&lt;BR /&gt;extern int vn_open __((char *, int, int, int, int, struct vnode **));&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;what are four int type parameters?</description>
      <pubDate>Wed, 12 Aug 2009 13:51:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-open-a-file-in-kernel-space/m-p/4477928#M652632</guid>
      <dc:creator>kaijile</dc:creator>
      <dc:date>2009-08-12T13:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: how open a file in Kernel Space</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-open-a-file-in-kernel-space/m-p/4477929#M652633</link>
      <description>In /usr/include/sys/vnode.h&lt;BR /&gt;&lt;BR /&gt;has the function vn_open, but there is no man page for it.&lt;BR /&gt;&lt;BR /&gt;extern int vn_open __((char *, int, int, int, int, struct vnode **));&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;what are four int type parameters?&lt;BR /&gt;(char *pnamep, int seg, int filemode, int createmode, int plainmode, stru&lt;BR /&gt;ct vnode **vpp)&lt;BR /&gt;&lt;BR /&gt;just a remark, you can also open it at user level, and use it from kernel.&lt;BR /&gt;&lt;BR /&gt;filemode being FREAD|FWRITE|....FCREAT...&lt;BR /&gt;plainmode and createmode are used only when FCREAT is used&lt;BR /&gt;&lt;BR /&gt;vn_rdwr(enum uio_rw rw, struct vnode *vp, char *base, size_t len, k_off_t offset, int seg, int ioflag, long *aresid, int fpflags)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;but basically is it often more confortable and less problematic to have a user level daemon which read() from your device the messages to log and log them from user level;&lt;BR /&gt;The risk is much less than making that sort of thing from the kernel, due to the fact for instance that kernel is not preemtable,&lt;BR /&gt;&lt;BR /&gt;for instance nettl is doing this that way.&lt;BR /&gt;ntl_reader running at rt prio is logging the nettl traces and logs.&lt;BR /&gt;So my advice is use a user level daemon to log to a file. it will work more easily with no risk&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Aug 2009 10:04:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-open-a-file-in-kernel-space/m-p/4477929#M652633</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-08-17T10:04:22Z</dc:date>
    </item>
  </channel>
</rss>

