<?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 to use swapctl() function to list swap devices ??? in Operating System - Tru64 Unix</title>
    <link>https://community.hpe.com/t5/operating-system-tru64-unix/how-to-use-swapctl-function-to-list-swap-devices/m-p/3152234#M8221</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;can you specify, what kind of error you have? Compile error, wrong output or something else? I have no access to a computer right now, so I must guess.&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
    <pubDate>Thu, 25 Dec 2003 12:06:55 GMT</pubDate>
    <dc:creator>Michael Schulte zur Sur</dc:creator>
    <dc:date>2003-12-25T12:06:55Z</dc:date>
    <item>
      <title>How to use swapctl() function to list swap devices ???</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/how-to-use-swapctl-function-to-list-swap-devices/m-p/3152233#M8220</link>
      <description>Hi guys, this C program is driving me crazy for listing swap devices .. dont know what is the error .. Can anybody help me ???&lt;BR /&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;  int i, res;&lt;BR /&gt;  struct swapent ent;&lt;BR /&gt;  struct swapent* ent_ptr;&lt;BR /&gt;  struct swaptable tb1;&lt;BR /&gt;&lt;BR /&gt;  tb1.swt_n = 10;&lt;BR /&gt;  for (i=0; i&amp;lt;10; i++)&lt;BR /&gt;  {&lt;BR /&gt; ent_ptr = malloc(sizeof(ent));&lt;BR /&gt; tb1.swt_ent[i] = *ent_ptr;&lt;BR /&gt; tb1.swt_ent[i].ste_path = malloc(sizeof(char[MAXPATHLEN]));&lt;BR /&gt; printf ("loc(swt_ent)=%p loc(path)=%p\n",&lt;BR /&gt;   &amp;amp;tb1.swt_ent[i],&lt;BR /&gt;   tb1.swt_ent[i].ste_path);&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;  res = swapctl(SC_LIST, &amp;amp;tb1);&lt;BR /&gt;  if (res&amp;gt;=0)&lt;BR /&gt;    for (i=0; i&lt;RES&gt;&lt;/RES&gt;    {&lt;BR /&gt; /* This line is the source of error - if commented out everything runs fine */&lt;BR /&gt; printf ("%s", tb1.swt_ent[i].ste_path);&lt;BR /&gt;&lt;BR /&gt; printf ("(%p) ", tb1.swt_ent[i].ste_path);&lt;BR /&gt; printf ("swap %d: size=%ld pages, free=%ld pages\n",&lt;BR /&gt;   i, /*tb1.swt_ent[i].ste_path,*/&lt;BR /&gt;   tb1.swt_ent[i].ste_pages,&lt;BR /&gt;   tb1.swt_ent[i].ste_free);&lt;BR /&gt;    }&lt;BR /&gt;  else perror ("swapctl");&lt;BR /&gt;}&lt;BR /&gt;&lt;/STDIO.H&gt;&lt;/SYS&gt;&lt;/SYS&gt;&lt;/SYS&gt;</description>
      <pubDate>Wed, 24 Dec 2003 12:58:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/how-to-use-swapctl-function-to-list-swap-devices/m-p/3152233#M8220</guid>
      <dc:creator>Ali Humaidan</dc:creator>
      <dc:date>2003-12-24T12:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to use swapctl() function to list swap devices ???</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/how-to-use-swapctl-function-to-list-swap-devices/m-p/3152234#M8221</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;can you specify, what kind of error you have? Compile error, wrong output or something else? I have no access to a computer right now, so I must guess.&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Dec 2003 12:06:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/how-to-use-swapctl-function-to-list-swap-devices/m-p/3152234#M8221</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2003-12-25T12:06:55Z</dc:date>
    </item>
  </channel>
</rss>

