Novell Home

Example of netware vol info from name()

From Developer Community

This is a very simple example that lets you verify that netware_vol_info_from_name() now works even for volumes other than SYS ;)

Sample Code

#include <monitor.h>
#include <stdio.h>
#include <stdlib.h>

int main( int argc, char* argv[]) {
  struct volume_info info;
  int ccode;
  if ( argc != 2) {
    printf( "Syntax: %s <volume_name>\n", argv[ 0]);
    return EXIT_FAILURE;
  }
  ccode = netware_vol_info_from_name( &info, argv[ 1]);
  if ( ccode != 0) {
    printf( "netware_vol_info_from_name failed, ccode = %d\n", ccode);
    return EXIT_FAILURE;
  }
  printf( "volume_info.name = %s\n", info.name);
  return EXIT_SUCCESS;
}

--Dmitry Mityugov

Novell® Making IT Work As One

© 2008 Novell, Inc. All Rights Reserved.