Commit 57b2dd6f authored by claes's avatar claes

New function syi_UserName

parent b2dc13f4
/*
* Proview $Id: co_syi.h,v 1.1 2007-05-24 14:48:38 claes Exp $
* Proview $Id: co_syi.h,v 1.2 2008-06-24 07:03:42 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -35,6 +35,7 @@ char *syi_HostSpec (pwr_tStatus*, char*, int);
char *syi_NodeName (pwr_tStatus*, char*, int);
char *syi_NodeSpec (pwr_tStatus*, char*, int);
pwr_tBoolean syi_LocalBoot (pwr_tStatus*);
pwr_tStatus syi_UserName( char *user, int len);
#if defined __cplusplus
}
......
/*
* Proview $Id: co_syi.c,v 1.1 2007-05-24 14:48:38 claes Exp $
* Proview $Id: co_syi.c,v 1.2 2008-06-24 07:03:42 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -131,3 +131,14 @@ syi_BootDisk (
return NULL;
}
pwr_tStatus syi_UserName( char *user, int len)
{
char *p;
p = getlogin();
if ( !p)
return 0;
strncpy( user, p, len);
return 1;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment