On Tue, 13 Jul 1999, Philip Blundell wrote:

> >I am running 2.2.10-rmk2-stk1 on an ebsa-285 like board.  I have
> >implemented my own system call which reads out some data stored in the
> >kernel, or lets the user change this data depending on what arguments
> >they pass in.  It takes 4 arguments:
> 
> You should probably consider using sysctl for this, incidentally.
> 
Actually, this is already implemented as a sysctl, I just wanted to try
and implement it as a system call also.

> >if ((i = syscall(VP_SYSCALL, &my_vp, &my_vp_size, 0, 0)) < 0)
> 
> Where is your definition of `syscall' coming from; can you post the 
> preprocessed output and/or assembler that it generates?
> 
Okay, both are attached.

> >It looks like it actually pushes all 5 arguments passed to it onto the
> >stack, and thus the reason for the syscall number being the first
> >argument to my sys_vend_param() function.  If I put a dummy int as the
> >first argument to my sys_vend_param() routine, things seem to work fine.
> >
> >Is this expected behaviour?
> 
> Kind of.  The ARM Linux ABI puts the syscall number in the SWI instruction 
> rather than in a register.  So yes, it is expected that all five arguments to 
> the syscall are simply passed straight through to your routine, but no it is 
> not expected that one of them is your syscall number.
> 
Interesting.  I didn't think this was the way it was supposed to work.

--
Kyle Mestery                    | StorageTek's Storage Networking Group
[EMAIL PROTECTED]                | http://www.freebsd.org/
[EMAIL PROTECTED]           | http://www.netwinder.org/
        Protect your right to privacy: www.freecrypto.org
# 1 "sys_call.c"
# 1 "/usr/include/stdio.h" 1 3
 

















 







# 1 "/usr/include/features.h" 1 3
 




















 


























































 



















 





 



 







 
# 137 "/usr/include/features.h" 3


 









 





 



























# 195 "/usr/include/features.h" 3


































 



 








 




 

# 1 "/usr/include/sys/cdefs.h" 1 3
 




















 




 




 








 




# 70 "/usr/include/sys/cdefs.h" 3


 







 



# 102 "/usr/include/sys/cdefs.h" 3



 








 















 








 








 









 







# 249 "/usr/include/features.h" 2 3


 








 





 

 








# 1 "/usr/include/gnu/stubs.h" 1 3
 

























# 277 "/usr/include/features.h" 2 3




# 27 "/usr/include/stdio.h" 2 3


 



# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 1 3






 


# 19 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3



 


 





 


# 61 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 





 


















 





 

 

# 131 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 


































typedef unsigned int size_t;






















 




 

# 271 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


# 283 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 

# 317 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3




 





















# 33 "/usr/include/stdio.h" 2 3





# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 1 3
 





























































 






typedef void *__gnuc_va_list;



 

# 116 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 3



















# 202 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 3




# 38 "/usr/include/stdio.h" 2 3


# 1 "/usr/include/bits/types.h" 1 3
 

















 









# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 1 3






 


# 19 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3



 


 





 


# 61 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 





 


















 





 

 

# 131 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 


# 188 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3





 




 

# 271 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


# 283 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 

# 317 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3




 





















# 29 "/usr/include/bits/types.h" 2 3


 
typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;

__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;
# 48 "/usr/include/bits/types.h" 3

typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;

__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;

typedef __quad_t *__qaddr_t;

typedef __u_quad_t __dev_t;              
typedef __u_int __uid_t;                 
typedef __u_int __gid_t;                 
typedef __u_long __ino_t;                
typedef __u_int __mode_t;                
typedef __u_int __nlink_t;               
typedef long int __off_t;                
typedef __quad_t __loff_t;               
typedef int __pid_t;                     
typedef int __ssize_t;                   
typedef long int __rlim_t;               
typedef __quad_t __rlim64_t;             
typedef __u_int __id_t;                  

typedef struct
  {
    int __val[2];
  } __fsid_t;                            

 
typedef int __daddr_t;                   
typedef char *__caddr_t;
typedef long int __time_t;
typedef long int __swblk_t;              

typedef long int __clock_t;

 
typedef unsigned long int __fd_mask;

 


 




 
typedef struct
  {
     





    __fd_mask __fds_bits[1024  / (8 * sizeof (__fd_mask)) ];


  } __fd_set;


typedef int __key_t;

 
typedef unsigned short int __ipc_pid_t;


 

 
typedef __u_long __blkcnt_t;
typedef __u_quad_t __blkcnt64_t;

 
typedef long int __fsblkcnt_t;
typedef __quad_t __fsblkcnt64_t;

 
typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;

 
typedef __u_long __ino64_t;

 
typedef __loff_t __off64_t;

 
typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;

 
typedef int __intptr_t;


 





# 40 "/usr/include/stdio.h" 2 3







 
typedef struct _IO_FILE FILE;








# 1 "/usr/include/libio.h" 1 3
 




























# 1 "/usr/include/_G_config.h" 1 3
 





 






# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 1 3






 


# 19 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3



 


 





 


# 61 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 





 


















 





 

 

# 131 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 


# 188 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3





 




 





























 


























typedef long int wchar_t;
























typedef unsigned int  wint_t;




 

 

# 317 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3




 





















# 14 "/usr/include/_G_config.h" 2 3





















typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));




 


















 




 














# 30 "/usr/include/libio.h" 2 3
















 

# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 1 3
 





























































 










 

# 116 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 3



















# 202 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 3




# 48 "/usr/include/libio.h" 2 3







# 67 "/usr/include/libio.h" 3


 

















# 98 "/usr/include/libio.h" 3











 
























 



















struct _IO_jump_t;  struct _IO_FILE;

 







typedef void _IO_lock_t;



 

struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;
   

   
  int _pos;
# 186 "/usr/include/libio.h" 3

};

struct _IO_FILE {
  int _flags;            


   
   
  char* _IO_read_ptr;    
  char* _IO_read_end;    
  char* _IO_read_base;   
  char* _IO_write_base;  
  char* _IO_write_ptr;   
  char* _IO_write_end;   
  char* _IO_buf_base;    
  char* _IO_buf_end;     
   
  char *_IO_save_base;  
  char *_IO_backup_base;   
  char *_IO_save_end;  

  struct _IO_marker *_markers;

  struct _IO_FILE *_chain;

  int _fileno;
  int _blksize;
  __off_t   _old_offset;  


   
  unsigned short _cur_column;
  signed char _vtable_offset;
  char _shortbuf[1];

   

  _IO_lock_t *_lock;








  __off64_t   _offset;
   
  int _unused2[16];

};


typedef struct _IO_FILE _IO_FILE;


struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;











# 276 "/usr/include/libio.h" 3







extern int __underflow  (_IO_FILE *)    ;
extern int __uflow  (_IO_FILE *)    ;
extern int __overflow  (_IO_FILE *, int)    ;
















extern int _IO_getc  (_IO_FILE *__fp)    ;
extern int _IO_putc  (int __c, _IO_FILE *__fp)    ;
extern int _IO_feof  (_IO_FILE *__fp)    ;
extern int _IO_ferror  (_IO_FILE *__fp)    ;

extern int _IO_peekc_locked  (_IO_FILE *__fp)    ;

 



extern void _IO_flockfile  (_IO_FILE *)    ;
extern void _IO_funlockfile  (_IO_FILE *)    ;
extern int _IO_ftrylockfile  (_IO_FILE *)    ;












extern int _IO_vfscanf  (_IO_FILE *  , const char *  ,
                             __gnuc_va_list , int *  )    ;
extern int _IO_vfprintf  (_IO_FILE *  , const char *  ,
                              __gnuc_va_list )    ;
extern __ssize_t   _IO_padn  (_IO_FILE *, int, __ssize_t  )    ;
extern size_t   _IO_sgetn  (_IO_FILE *, void *, size_t  )    ;

extern __off64_t   _IO_seekoff  (_IO_FILE *, __off64_t  , int, int)    ;
extern __off64_t   _IO_seekpos  (_IO_FILE *, __off64_t  , int)    ;

extern void _IO_free_backup_area  (_IO_FILE *)    ;






# 57 "/usr/include/stdio.h" 2 3


 

typedef __off_t  fpos_t;







 





 





 






 







 




 








# 1 "/usr/include/bits/stdio_lim.h" 1 3
 




































# 110 "/usr/include/stdio.h" 2 3



 
extern FILE *stdin;              
extern FILE *stdout;             
extern FILE *stderr;             


 
extern int remove  (__const char *__filename)    ;
 
extern int rename  (__const char *__old, __const char *__new)    ;


 

extern FILE *tmpfile  (void)    ;










 
extern char *tmpnam  (char *__s)    ;


 

extern char *tmpnam_r  (char *__s)    ;




 






extern char *tempnam  (__const char *__dir, __const char *__pfx)    ;



 
extern int fclose  (FILE *__stream)    ;
 
extern int fflush  (FILE *__stream)    ;


 
extern int fflush_unlocked  (FILE *__stream)    ;









 
extern FILE *fopen  (__const char *   __filename,
                         __const char *   __modes)    ;
 
extern FILE *freopen  (__const char *   __filename,
                           __const char *   __modes,
                           FILE *   __stream)    ;
# 197 "/usr/include/stdio.h" 3










 
extern FILE *fdopen  (int __fd, __const char *__modes)    ;


# 223 "/usr/include/stdio.h" 3



 

extern void setbuf  (FILE *   __stream, char *   __buf)    ;
 


extern int setvbuf  (FILE *   __stream, char *   __buf,
                         int __modes, size_t __n)    ;


 

extern void setbuffer  (FILE *   __stream, char *   __buf,
                            size_t __size)    ;

 
extern void setlinebuf  (FILE *__stream)    ;



 
extern int fprintf  (FILE *   __stream,
                         __const char *   __format, ...)    ;
 
extern int printf  (__const char *   __format, ...)    ;
 
extern int sprintf  (char *   __s,
                         __const char *   __format, ...)    ;

 
extern int vfprintf  (FILE *   __s,
                          __const char *   __format,
                          __gnuc_va_list  __arg)    ;
 
extern int vprintf  (__const char *   __format,
                         __gnuc_va_list  __arg)    ;
 
extern int vsprintf  (char *   __s,
                          __const char *   __format,
                          __gnuc_va_list  __arg)    ;


 
extern int snprintf  (char *   __s, size_t __maxlen,
                          __const char *   __format, ...)    
     __attribute__ ((__format__ (__printf__, 3, 4)));

extern int __vsnprintf  (char *   __s, size_t __maxlen,
                             __const char *   __format,
                             __gnuc_va_list  __arg)    
     __attribute__ ((__format__ (__printf__, 3, 0)));
extern int vsnprintf  (char *   __s, size_t __maxlen,
                           __const char *   __format,
                           __gnuc_va_list  __arg)    
     __attribute__ ((__format__ (__printf__, 3, 0)));


# 302 "/usr/include/stdio.h" 3



 
extern int fscanf  (FILE *   __stream,
                        __const char *   __format, ...)    ;
 
extern int scanf  (__const char *   __format, ...)    ;
 
extern int sscanf  (__const char *   __s,
                        __const char *   __format, ...)    ;

# 330 "/usr/include/stdio.h" 3



 
extern int fgetc  (FILE *__stream)    ;
extern int getc  (FILE *__stream)    ;

 
extern int getchar  (void)    ;

 




 
extern int getc_unlocked  (FILE *__stream)    ;
extern int getchar_unlocked  (void)    ;



 
extern int fgetc_unlocked  (FILE *__stream)    ;



 
extern int fputc  (int __c, FILE *__stream)    ;
extern int putc  (int __c, FILE *__stream)    ;

 
extern int putchar  (int __c)    ;

 




 
extern int fputc_unlocked  (int __c, FILE *__stream)    ;



 
extern int putc_unlocked  (int __c, FILE *__stream)    ;
extern int putchar_unlocked  (int __c)    ;




 
extern int getw  (FILE *__stream)    ;

 
extern int putw  (int __w, FILE *__stream)    ;



 
extern char *fgets  (char *   __s, int __n,
                         FILE *   __stream)    ;







 

extern char *gets  (char *__s)    ;


# 420 "/usr/include/stdio.h" 3



 
extern int fputs  (__const char *   __s,
                       FILE *   __stream)    ;







 
extern int puts  (__const char *__s)    ;


 
extern int ungetc  (int __c, FILE *__stream)    ;


 
extern size_t fread  (void *   __ptr, size_t __size,
                          size_t __n, FILE *   __stream)    ;
 
extern size_t fwrite  (__const void *   __ptr, size_t __size,
                           size_t __n, FILE *   __s)    ;


 
extern size_t fread_unlocked  (void *   __ptr, size_t __size,
                                   size_t __n, FILE *   __stream)    ;
extern size_t fwrite_unlocked  (__const void *   __ptr,
                                    size_t __size, size_t __n,
                                    FILE *   __stream)    ;



 
extern int fseek  (FILE *__stream, long int __off, int __whence)    ;
 
extern long int ftell  (FILE *__stream)    ;
 
extern void rewind  (FILE *__stream)    ;

 




 


typedef __off_t off_t;




















 
extern int fgetpos  (FILE *   __stream,
                         fpos_t *   __pos)    ;
 
extern int fsetpos  (FILE *__stream, __const fpos_t *__pos)    ;
# 519 "/usr/include/stdio.h" 3


# 529 "/usr/include/stdio.h" 3


 
extern void clearerr  (FILE *__stream)    ;
 
extern int feof  (FILE *__stream)    ;
 
extern int ferror  (FILE *__stream)    ;


 
extern void clearerr_unlocked  (FILE *__stream)    ;
extern int feof_unlocked  (FILE *__stream)    ;
extern int ferror_unlocked  (FILE *__stream)    ;



 
extern void perror  (__const char *__s)    ;

 


extern int sys_nerr;
extern __const char *__const sys_errlist[];








 
extern int fileno  (FILE *__stream)    ;



 
extern int fileno_unlocked  (FILE *__stream)    ;





 
extern FILE *popen  (__const char *__command, __const char *__modes)    ;

 
extern int pclose  (FILE *__stream)    ;




 
extern char *ctermid  (char *__s)    ;









# 603 "/usr/include/stdio.h" 3




 

 
extern void flockfile  (FILE *__stream)    ;

 

extern int ftrylockfile  (FILE *__stream)    ;

 
extern void funlockfile  (FILE *__stream)    ;










 





 




# 1 "sys_call.c" 2

# 1 "/usr/include/time.h" 1 3
 

















 










 




 


# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 1 3






 


# 19 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3



 


 





 


# 61 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 





 


















 





 

 

# 131 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 


# 188 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3





 




 

# 271 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


# 283 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 

# 317 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3




 





















# 38 "/usr/include/time.h" 2 3







 

# 1 "/usr/include/bits/time.h" 1 3
 


















 







 


 





 







# 59 "/usr/include/bits/time.h" 3
 
# 47 "/usr/include/time.h" 2 3


 














 
typedef __clock_t clock_t;









 
typedef __time_t time_t;









 

struct timespec
  {
    long int tv_sec;             
    long int tv_nsec;            
  };






 
struct tm
{
  int tm_sec;                    
  int tm_min;                    
  int tm_hour;                   
  int tm_mday;                   
  int tm_mon;                    
  int tm_year;                   
  int tm_wday;                   
  int tm_yday;                   
  int tm_isdst;                  


  long int tm_gmtoff;            
  __const char *tm_zone;         




};


 

extern clock_t clock  (void)    ;

 
extern time_t time  (time_t *__timer)    ;

 
extern double difftime  (time_t __time1, time_t __time0)    
     __attribute__ ((__const__));

 
extern time_t mktime  (struct tm *__tp)    ;


 


extern size_t strftime  (char *   __s, size_t __maxsize,
                             __const char *   __format,
                             __const struct tm *   __tp)    ;









 

extern struct tm *gmtime  (__const time_t *__timer)    ;

 

extern struct tm *localtime  (__const time_t *__timer)    ;


 

extern struct tm *__gmtime_r  (__const time_t *   __timer,
                                   struct tm *   __tp)    ;
extern struct tm *gmtime_r  (__const time_t *   __timer,
                                 struct tm *   __tp)    ;

 

extern struct tm *localtime_r  (__const time_t *   __timer,
                                    struct tm *   __tp)    ;


 

extern char *asctime  (__const struct tm *__tp)    ;

 
extern char *ctime  (__const time_t *__timer)    ;


 

 

extern char *asctime_r  (__const struct tm *   __tp,
                             char *   __buf)    ;

 
extern char *ctime_r  (__const time_t *   __timer,
                           char *   __buf)    ;



 
extern char *__tzname[2];        
extern int __daylight;           
extern long int __timezone;      



 
extern char *tzname[2];

 

extern void tzset  (void)    ;



extern int daylight;
extern long int timezone;



 

extern int stime  (__const time_t *__when)    ;



 






 


 
extern time_t timegm  (struct tm *__tp)    ;

 
extern time_t timelocal  (struct tm *__tp)    ;

 
extern int dysize  (int __year)    ;




 
extern int nanosleep  (__const struct timespec *__requested_time,
                           struct timespec *__remaining)    ;



# 269 "/usr/include/time.h" 3


# 279 "/usr/include/time.h" 3



 




# 2 "sys_call.c" 2

# 1 "/usr/include/sys/types.h" 1 3
 

















 








 




typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;


typedef __loff_t loff_t;



typedef __ino_t ino_t;










typedef __dev_t dev_t;




typedef __gid_t gid_t;




typedef __mode_t mode_t;




typedef __nlink_t nlink_t;




typedef __uid_t uid_t;

















typedef __pid_t pid_t;




typedef __id_t id_t;



typedef __ssize_t ssize_t;




typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;



typedef __key_t key_t;









# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 1 3






 


# 19 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3



 


 





 


# 61 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 





 


















 





 

 

# 131 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 


# 188 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3





 




 

# 271 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


# 283 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 

# 317 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3




 





















# 124 "/usr/include/sys/types.h" 2 3



 
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;


 

# 158 "/usr/include/sys/types.h" 3


 







typedef int int8_t __attribute__ ((__mode__ (  __QI__ ))) ;
typedef int int16_t __attribute__ ((__mode__ (  __HI__ ))) ;
typedef int int32_t __attribute__ ((__mode__ (  __SI__ ))) ;
typedef int int64_t __attribute__ ((__mode__ (  __DI__ ))) ;


typedef unsigned int u_int8_t __attribute__ ((__mode__ (  __QI__ ))) ;
typedef unsigned int u_int16_t __attribute__ ((__mode__ (  __HI__ ))) ;
typedef unsigned int u_int32_t __attribute__ ((__mode__ (  __SI__ ))) ;
typedef unsigned int u_int64_t __attribute__ ((__mode__ (  __DI__ ))) ;

typedef int register_t __attribute__ ((__mode__ (__word__)));


 






 
# 1 "/usr/include/endian.h" 1 3
 






















 









 
# 1 "/usr/include/bits/endian.h" 1 3
 







# 35 "/usr/include/endian.h" 2 3


 





 













# 190 "/usr/include/sys/types.h" 2 3


 
# 1 "/usr/include/sys/select.h" 1 3
 


















 






 


 
# 1 "/usr/include/bits/select.h" 1 3
 






















 











# 31 "/usr/include/sys/select.h" 2 3


 
# 1 "/usr/include/bits/sigset.h" 1 3
 





















typedef int __sig_atomic_t;

 


typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int))) ];
  } __sigset_t;




 





# 125 "/usr/include/bits/sigset.h" 3

# 34 "/usr/include/sys/select.h" 2 3


 



 

 



struct timeval;

typedef __fd_mask fd_mask;

 
typedef __fd_set fd_set;

 



 




 






 




extern int __select  (int __nfds, __fd_set *__readfds,
                          __fd_set *__writefds, __fd_set *__exceptfds,
                          struct timeval *__timeout)    ;
extern int select  (int __nfds, __fd_set *__readfds,
                        __fd_set *__writefds, __fd_set *__exceptfds,
                        struct timeval *__timeout)    ;

# 91 "/usr/include/sys/select.h" 3


 


# 193 "/usr/include/sys/types.h" 2 3


 
# 1 "/usr/include/sys/sysmacros.h" 1 3
 





















 














# 196 "/usr/include/sys/types.h" 2 3




 

typedef __blkcnt_t blkcnt_t;      
typedef __fsblkcnt_t fsblkcnt_t;  
typedef __fsfilcnt_t fsfilcnt_t;  












 


# 3 "sys_call.c" 2

# 1 "/usr/include/asm/unistd.h" 1 3





 


















































































































































































































# 225 "/usr/include/asm/unistd.h" 3


# 238 "/usr/include/asm/unistd.h" 3


# 252 "/usr/include/asm/unistd.h" 3



# 268 "/usr/include/asm/unistd.h" 3



# 285 "/usr/include/asm/unistd.h" 3
  


# 304 "/usr/include/asm/unistd.h" 3

# 419 "/usr/include/asm/unistd.h" 3





# 4 "sys_call.c" 2


# 1 "vendparam.h" 1



 

 









 









 








 






 










 














 




















 
























struct if_card_info {
    unsigned char RevLevel;  
    unsigned char CardType;  
    char CardPartNum[11];   
    char FirmwareNum[11];   
    unsigned char go_bootp;   

};

struct vend_params {
    char ChassisId[9];   
    unsigned char SlotNum;  
    unsigned char ResetCause;   
    unsigned char NumCSBs;  
    int isMaster;     

    int DiagResult;   
    char CardPartNum[11];   
    unsigned char CardType;  
    unsigned char RevLevel;  
    unsigned char SerialNum[9];  
    int proctype;
    int procnum;   
    unsigned long my_ip_addr;    
    unsigned long my_shm_addr;  
    unsigned long my_base_addr;  
    unsigned long host_ip_addr;  
    unsigned char subnet_mask[4];   
    unsigned char MAC_addr[6 ];   
    char hostName [20 ];         
    char targetName [20 ];         
    char startupScript [80 ];    
    char bootFile [80 ];   
    char sw_path  [80 ];   
    char fw_path  [80 ];   
    char initBase_path [80 ];   

    unsigned char exception_sig;  
    int csbserv_tid;   
    int prom_Major;      
    int image_Major;     
    int image_Minor;     
    char FirmwareNum[11];   
    char BasepkgNum[11];   
    struct if_card_info if_cards[16];
    unsigned char world_addr[6];   
};
    




# 174 "vendparam.h"


# 6 "sys_call.c" 2




 

void main(void)
{
        int i;
        time_t t = 0;
        struct vend_params my_vp;
        size_t my_vp_size = sizeof(struct vend_params);

        printf("Slotnum: %d\n", my_vp.SlotNum);
        if ((i = syscall((191 ^ (9  << 20)) , &my_vp, &my_vp_size, 0, 0)) < 0)
        {
                perror("sys_vend_param");
                printf("syscall() return value: %d\n", i);
                return;
        }

        printf("Slotnum: %d\n", my_vp.SlotNum);
        return;
}
# 1 "sys_call.c"
# 1 "/usr/include/stdio.h" 1 3
 

















 







# 1 "/usr/include/features.h" 1 3
 




















 


























































 



















 





 



 







 
# 137 "/usr/include/features.h" 3


 









 





 



























# 195 "/usr/include/features.h" 3


































 



 








 




 

# 1 "/usr/include/sys/cdefs.h" 1 3
 




















 




 




 








 




# 70 "/usr/include/sys/cdefs.h" 3


 







 



# 102 "/usr/include/sys/cdefs.h" 3



 








 















 








 








 









 







# 249 "/usr/include/features.h" 2 3


 








 





 

 








# 1 "/usr/include/gnu/stubs.h" 1 3
 

























# 277 "/usr/include/features.h" 2 3




# 27 "/usr/include/stdio.h" 2 3


 



# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 1 3






 


# 19 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3



 


 





 


# 61 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 





 


















 





 

 

# 131 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 


































typedef unsigned int size_t;






















 




 

# 271 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


# 283 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 

# 317 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3




 





















# 33 "/usr/include/stdio.h" 2 3





# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 1 3
 





























































 






typedef void *__gnuc_va_list;



 

# 116 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 3



















# 202 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 3




# 38 "/usr/include/stdio.h" 2 3


# 1 "/usr/include/bits/types.h" 1 3
 

















 









# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 1 3






 


# 19 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3



 


 





 


# 61 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 





 


















 





 

 

# 131 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 


# 188 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3





 




 

# 271 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


# 283 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 

# 317 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3




 





















# 29 "/usr/include/bits/types.h" 2 3


 
typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;

__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;
# 48 "/usr/include/bits/types.h" 3

typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;

__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;

typedef __quad_t *__qaddr_t;

typedef __u_quad_t __dev_t;              
typedef __u_int __uid_t;                 
typedef __u_int __gid_t;                 
typedef __u_long __ino_t;                
typedef __u_int __mode_t;                
typedef __u_int __nlink_t;               
typedef long int __off_t;                
typedef __quad_t __loff_t;               
typedef int __pid_t;                     
typedef int __ssize_t;                   
typedef long int __rlim_t;               
typedef __quad_t __rlim64_t;             
typedef __u_int __id_t;                  

typedef struct
  {
    int __val[2];
  } __fsid_t;                            

 
typedef int __daddr_t;                   
typedef char *__caddr_t;
typedef long int __time_t;
typedef long int __swblk_t;              

typedef long int __clock_t;

 
typedef unsigned long int __fd_mask;

 


 




 
typedef struct
  {
     





    __fd_mask __fds_bits[1024  / (8 * sizeof (__fd_mask)) ];


  } __fd_set;


typedef int __key_t;

 
typedef unsigned short int __ipc_pid_t;


 

 
typedef __u_long __blkcnt_t;
typedef __u_quad_t __blkcnt64_t;

 
typedef long int __fsblkcnt_t;
typedef __quad_t __fsblkcnt64_t;

 
typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;

 
typedef __u_long __ino64_t;

 
typedef __loff_t __off64_t;

 
typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;

 
typedef int __intptr_t;


 





# 40 "/usr/include/stdio.h" 2 3







 
typedef struct _IO_FILE FILE;








# 1 "/usr/include/libio.h" 1 3
 




























# 1 "/usr/include/_G_config.h" 1 3
 





 






# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 1 3






 


# 19 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3



 


 





 


# 61 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 





 


















 





 

 

# 131 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 


# 188 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3





 




 





























 


























typedef long int wchar_t;
























typedef unsigned int  wint_t;




 

 

# 317 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3




 





















# 14 "/usr/include/_G_config.h" 2 3





















typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));




 


















 




 














# 30 "/usr/include/libio.h" 2 3
















 

# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 1 3
 





























































 










 

# 116 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 3



















# 202 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stdarg.h" 3




# 48 "/usr/include/libio.h" 2 3







# 67 "/usr/include/libio.h" 3


 

















# 98 "/usr/include/libio.h" 3











 
























 



















struct _IO_jump_t;  struct _IO_FILE;

 







typedef void _IO_lock_t;



 

struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;
   

   
  int _pos;
# 186 "/usr/include/libio.h" 3

};

struct _IO_FILE {
  int _flags;            


   
   
  char* _IO_read_ptr;    
  char* _IO_read_end;    
  char* _IO_read_base;   
  char* _IO_write_base;  
  char* _IO_write_ptr;   
  char* _IO_write_end;   
  char* _IO_buf_base;    
  char* _IO_buf_end;     
   
  char *_IO_save_base;  
  char *_IO_backup_base;   
  char *_IO_save_end;  

  struct _IO_marker *_markers;

  struct _IO_FILE *_chain;

  int _fileno;
  int _blksize;
  __off_t   _old_offset;  


   
  unsigned short _cur_column;
  signed char _vtable_offset;
  char _shortbuf[1];

   

  _IO_lock_t *_lock;








  __off64_t   _offset;
   
  int _unused2[16];

};


typedef struct _IO_FILE _IO_FILE;


struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;











# 276 "/usr/include/libio.h" 3







extern int __underflow  (_IO_FILE *)    ;
extern int __uflow  (_IO_FILE *)    ;
extern int __overflow  (_IO_FILE *, int)    ;
















extern int _IO_getc  (_IO_FILE *__fp)    ;
extern int _IO_putc  (int __c, _IO_FILE *__fp)    ;
extern int _IO_feof  (_IO_FILE *__fp)    ;
extern int _IO_ferror  (_IO_FILE *__fp)    ;

extern int _IO_peekc_locked  (_IO_FILE *__fp)    ;

 



extern void _IO_flockfile  (_IO_FILE *)    ;
extern void _IO_funlockfile  (_IO_FILE *)    ;
extern int _IO_ftrylockfile  (_IO_FILE *)    ;












extern int _IO_vfscanf  (_IO_FILE *  , const char *  ,
                             __gnuc_va_list , int *  )    ;
extern int _IO_vfprintf  (_IO_FILE *  , const char *  ,
                              __gnuc_va_list )    ;
extern __ssize_t   _IO_padn  (_IO_FILE *, int, __ssize_t  )    ;
extern size_t   _IO_sgetn  (_IO_FILE *, void *, size_t  )    ;

extern __off64_t   _IO_seekoff  (_IO_FILE *, __off64_t  , int, int)    ;
extern __off64_t   _IO_seekpos  (_IO_FILE *, __off64_t  , int)    ;

extern void _IO_free_backup_area  (_IO_FILE *)    ;






# 57 "/usr/include/stdio.h" 2 3


 

typedef __off_t  fpos_t;







 





 





 






 







 




 








# 1 "/usr/include/bits/stdio_lim.h" 1 3
 




































# 110 "/usr/include/stdio.h" 2 3



 
extern FILE *stdin;              
extern FILE *stdout;             
extern FILE *stderr;             


 
extern int remove  (__const char *__filename)    ;
 
extern int rename  (__const char *__old, __const char *__new)    ;


 

extern FILE *tmpfile  (void)    ;










 
extern char *tmpnam  (char *__s)    ;


 

extern char *tmpnam_r  (char *__s)    ;




 






extern char *tempnam  (__const char *__dir, __const char *__pfx)    ;



 
extern int fclose  (FILE *__stream)    ;
 
extern int fflush  (FILE *__stream)    ;


 
extern int fflush_unlocked  (FILE *__stream)    ;









 
extern FILE *fopen  (__const char *   __filename,
                         __const char *   __modes)    ;
 
extern FILE *freopen  (__const char *   __filename,
                           __const char *   __modes,
                           FILE *   __stream)    ;
# 197 "/usr/include/stdio.h" 3










 
extern FILE *fdopen  (int __fd, __const char *__modes)    ;


# 223 "/usr/include/stdio.h" 3



 

extern void setbuf  (FILE *   __stream, char *   __buf)    ;
 


extern int setvbuf  (FILE *   __stream, char *   __buf,
                         int __modes, size_t __n)    ;


 

extern void setbuffer  (FILE *   __stream, char *   __buf,
                            size_t __size)    ;

 
extern void setlinebuf  (FILE *__stream)    ;



 
extern int fprintf  (FILE *   __stream,
                         __const char *   __format, ...)    ;
 
extern int printf  (__const char *   __format, ...)    ;
 
extern int sprintf  (char *   __s,
                         __const char *   __format, ...)    ;

 
extern int vfprintf  (FILE *   __s,
                          __const char *   __format,
                          __gnuc_va_list  __arg)    ;
 
extern int vprintf  (__const char *   __format,
                         __gnuc_va_list  __arg)    ;
 
extern int vsprintf  (char *   __s,
                          __const char *   __format,
                          __gnuc_va_list  __arg)    ;


 
extern int snprintf  (char *   __s, size_t __maxlen,
                          __const char *   __format, ...)    
     __attribute__ ((__format__ (__printf__, 3, 4)));

extern int __vsnprintf  (char *   __s, size_t __maxlen,
                             __const char *   __format,
                             __gnuc_va_list  __arg)    
     __attribute__ ((__format__ (__printf__, 3, 0)));
extern int vsnprintf  (char *   __s, size_t __maxlen,
                           __const char *   __format,
                           __gnuc_va_list  __arg)    
     __attribute__ ((__format__ (__printf__, 3, 0)));


# 302 "/usr/include/stdio.h" 3



 
extern int fscanf  (FILE *   __stream,
                        __const char *   __format, ...)    ;
 
extern int scanf  (__const char *   __format, ...)    ;
 
extern int sscanf  (__const char *   __s,
                        __const char *   __format, ...)    ;

# 330 "/usr/include/stdio.h" 3



 
extern int fgetc  (FILE *__stream)    ;
extern int getc  (FILE *__stream)    ;

 
extern int getchar  (void)    ;

 




 
extern int getc_unlocked  (FILE *__stream)    ;
extern int getchar_unlocked  (void)    ;



 
extern int fgetc_unlocked  (FILE *__stream)    ;



 
extern int fputc  (int __c, FILE *__stream)    ;
extern int putc  (int __c, FILE *__stream)    ;

 
extern int putchar  (int __c)    ;

 




 
extern int fputc_unlocked  (int __c, FILE *__stream)    ;



 
extern int putc_unlocked  (int __c, FILE *__stream)    ;
extern int putchar_unlocked  (int __c)    ;




 
extern int getw  (FILE *__stream)    ;

 
extern int putw  (int __w, FILE *__stream)    ;



 
extern char *fgets  (char *   __s, int __n,
                         FILE *   __stream)    ;







 

extern char *gets  (char *__s)    ;


# 420 "/usr/include/stdio.h" 3



 
extern int fputs  (__const char *   __s,
                       FILE *   __stream)    ;







 
extern int puts  (__const char *__s)    ;


 
extern int ungetc  (int __c, FILE *__stream)    ;


 
extern size_t fread  (void *   __ptr, size_t __size,
                          size_t __n, FILE *   __stream)    ;
 
extern size_t fwrite  (__const void *   __ptr, size_t __size,
                           size_t __n, FILE *   __s)    ;


 
extern size_t fread_unlocked  (void *   __ptr, size_t __size,
                                   size_t __n, FILE *   __stream)    ;
extern size_t fwrite_unlocked  (__const void *   __ptr,
                                    size_t __size, size_t __n,
                                    FILE *   __stream)    ;



 
extern int fseek  (FILE *__stream, long int __off, int __whence)    ;
 
extern long int ftell  (FILE *__stream)    ;
 
extern void rewind  (FILE *__stream)    ;

 




 


typedef __off_t off_t;




















 
extern int fgetpos  (FILE *   __stream,
                         fpos_t *   __pos)    ;
 
extern int fsetpos  (FILE *__stream, __const fpos_t *__pos)    ;
# 519 "/usr/include/stdio.h" 3


# 529 "/usr/include/stdio.h" 3


 
extern void clearerr  (FILE *__stream)    ;
 
extern int feof  (FILE *__stream)    ;
 
extern int ferror  (FILE *__stream)    ;


 
extern void clearerr_unlocked  (FILE *__stream)    ;
extern int feof_unlocked  (FILE *__stream)    ;
extern int ferror_unlocked  (FILE *__stream)    ;



 
extern void perror  (__const char *__s)    ;

 


extern int sys_nerr;
extern __const char *__const sys_errlist[];








 
extern int fileno  (FILE *__stream)    ;



 
extern int fileno_unlocked  (FILE *__stream)    ;





 
extern FILE *popen  (__const char *__command, __const char *__modes)    ;

 
extern int pclose  (FILE *__stream)    ;




 
extern char *ctermid  (char *__s)    ;









# 603 "/usr/include/stdio.h" 3




 

 
extern void flockfile  (FILE *__stream)    ;

 

extern int ftrylockfile  (FILE *__stream)    ;

 
extern void funlockfile  (FILE *__stream)    ;










 





 




# 1 "sys_call.c" 2

# 1 "/usr/include/time.h" 1 3
 

















 










 




 


# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 1 3






 


# 19 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3



 


 





 


# 61 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 





 


















 





 

 

# 131 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 


# 188 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3





 




 

# 271 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


# 283 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 

# 317 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3




 





















# 38 "/usr/include/time.h" 2 3







 

# 1 "/usr/include/bits/time.h" 1 3
 


















 







 


 





 







# 59 "/usr/include/bits/time.h" 3
 
# 47 "/usr/include/time.h" 2 3


 














 
typedef __clock_t clock_t;









 
typedef __time_t time_t;









 

struct timespec
  {
    long int tv_sec;             
    long int tv_nsec;            
  };






 
struct tm
{
  int tm_sec;                    
  int tm_min;                    
  int tm_hour;                   
  int tm_mday;                   
  int tm_mon;                    
  int tm_year;                   
  int tm_wday;                   
  int tm_yday;                   
  int tm_isdst;                  


  long int tm_gmtoff;            
  __const char *tm_zone;         




};


 

extern clock_t clock  (void)    ;

 
extern time_t time  (time_t *__timer)    ;

 
extern double difftime  (time_t __time1, time_t __time0)    
     __attribute__ ((__const__));

 
extern time_t mktime  (struct tm *__tp)    ;


 


extern size_t strftime  (char *   __s, size_t __maxsize,
                             __const char *   __format,
                             __const struct tm *   __tp)    ;









 

extern struct tm *gmtime  (__const time_t *__timer)    ;

 

extern struct tm *localtime  (__const time_t *__timer)    ;


 

extern struct tm *__gmtime_r  (__const time_t *   __timer,
                                   struct tm *   __tp)    ;
extern struct tm *gmtime_r  (__const time_t *   __timer,
                                 struct tm *   __tp)    ;

 

extern struct tm *localtime_r  (__const time_t *   __timer,
                                    struct tm *   __tp)    ;


 

extern char *asctime  (__const struct tm *__tp)    ;

 
extern char *ctime  (__const time_t *__timer)    ;


 

 

extern char *asctime_r  (__const struct tm *   __tp,
                             char *   __buf)    ;

 
extern char *ctime_r  (__const time_t *   __timer,
                           char *   __buf)    ;



 
extern char *__tzname[2];        
extern int __daylight;           
extern long int __timezone;      



 
extern char *tzname[2];

 

extern void tzset  (void)    ;



extern int daylight;
extern long int timezone;



 

extern int stime  (__const time_t *__when)    ;



 






 


 
extern time_t timegm  (struct tm *__tp)    ;

 
extern time_t timelocal  (struct tm *__tp)    ;

 
extern int dysize  (int __year)    ;




 
extern int nanosleep  (__const struct timespec *__requested_time,
                           struct timespec *__remaining)    ;



# 269 "/usr/include/time.h" 3


# 279 "/usr/include/time.h" 3



 




# 2 "sys_call.c" 2

# 1 "/usr/include/sys/types.h" 1 3
 

















 








 




typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;


typedef __loff_t loff_t;



typedef __ino_t ino_t;










typedef __dev_t dev_t;




typedef __gid_t gid_t;




typedef __mode_t mode_t;




typedef __nlink_t nlink_t;




typedef __uid_t uid_t;

















typedef __pid_t pid_t;




typedef __id_t id_t;



typedef __ssize_t ssize_t;




typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;



typedef __key_t key_t;









# 1 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 1 3






 


# 19 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3



 


 





 


# 61 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 





 


















 





 

 

# 131 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 


# 188 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3





 




 

# 271 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


# 283 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3


 

 

# 317 "/usr/lib/gcc-lib/arm-linux/egcs-2.91.60/include/stddef.h" 3




 





















# 124 "/usr/include/sys/types.h" 2 3



 
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;


 

# 158 "/usr/include/sys/types.h" 3


 







typedef int int8_t __attribute__ ((__mode__ (  __QI__ ))) ;
typedef int int16_t __attribute__ ((__mode__ (  __HI__ ))) ;
typedef int int32_t __attribute__ ((__mode__ (  __SI__ ))) ;
typedef int int64_t __attribute__ ((__mode__ (  __DI__ ))) ;


typedef unsigned int u_int8_t __attribute__ ((__mode__ (  __QI__ ))) ;
typedef unsigned int u_int16_t __attribute__ ((__mode__ (  __HI__ ))) ;
typedef unsigned int u_int32_t __attribute__ ((__mode__ (  __SI__ ))) ;
typedef unsigned int u_int64_t __attribute__ ((__mode__ (  __DI__ ))) ;

typedef int register_t __attribute__ ((__mode__ (__word__)));


 






 
# 1 "/usr/include/endian.h" 1 3
 






















 









 
# 1 "/usr/include/bits/endian.h" 1 3
 







# 35 "/usr/include/endian.h" 2 3


 





 













# 190 "/usr/include/sys/types.h" 2 3


 
# 1 "/usr/include/sys/select.h" 1 3
 


















 






 


 
# 1 "/usr/include/bits/select.h" 1 3
 






















 











# 31 "/usr/include/sys/select.h" 2 3


 
# 1 "/usr/include/bits/sigset.h" 1 3
 





















typedef int __sig_atomic_t;

 


typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int))) ];
  } __sigset_t;




 





# 125 "/usr/include/bits/sigset.h" 3

# 34 "/usr/include/sys/select.h" 2 3


 



 

 



struct timeval;

typedef __fd_mask fd_mask;

 
typedef __fd_set fd_set;

 



 




 






 




extern int __select  (int __nfds, __fd_set *__readfds,
                          __fd_set *__writefds, __fd_set *__exceptfds,
                          struct timeval *__timeout)    ;
extern int select  (int __nfds, __fd_set *__readfds,
                        __fd_set *__writefds, __fd_set *__exceptfds,
                        struct timeval *__timeout)    ;

# 91 "/usr/include/sys/select.h" 3


 


# 193 "/usr/include/sys/types.h" 2 3


 
# 1 "/usr/include/sys/sysmacros.h" 1 3
 





















 














# 196 "/usr/include/sys/types.h" 2 3




 

typedef __blkcnt_t blkcnt_t;      
typedef __fsblkcnt_t fsblkcnt_t;  
typedef __fsfilcnt_t fsfilcnt_t;  












 


# 3 "sys_call.c" 2

# 1 "/usr/include/asm/unistd.h" 1 3





 


















































































































































































































# 225 "/usr/include/asm/unistd.h" 3


# 238 "/usr/include/asm/unistd.h" 3


# 252 "/usr/include/asm/unistd.h" 3



# 268 "/usr/include/asm/unistd.h" 3



# 285 "/usr/include/asm/unistd.h" 3
  


# 304 "/usr/include/asm/unistd.h" 3

# 419 "/usr/include/asm/unistd.h" 3





# 4 "sys_call.c" 2


# 1 "vendparam.h" 1



 

 









 









 








 






 










 














 




















 
























struct if_card_info {
    unsigned char RevLevel;  
    unsigned char CardType;  
    char CardPartNum[11];   
    char FirmwareNum[11];   
    unsigned char go_bootp;   

};

struct vend_params {
    char ChassisId[9];   
    unsigned char SlotNum;  
    unsigned char ResetCause;   
    unsigned char NumCSBs;  
    int isMaster;     

    int DiagResult;   
    char CardPartNum[11];   
    unsigned char CardType;  
    unsigned char RevLevel;  
    unsigned char SerialNum[9];  
    int proctype;
    int procnum;   
    unsigned long my_ip_addr;    
    unsigned long my_shm_addr;  
    unsigned long my_base_addr;  
    unsigned long host_ip_addr;  
    unsigned char subnet_mask[4];   
    unsigned char MAC_addr[6 ];   
    char hostName [20 ];         
    char targetName [20 ];         
    char startupScript [80 ];    
    char bootFile [80 ];   
    char sw_path  [80 ];   
    char fw_path  [80 ];   
    char initBase_path [80 ];   

    unsigned char exception_sig;  
    int csbserv_tid;   
    int prom_Major;      
    int image_Major;     
    int image_Minor;     
    char FirmwareNum[11];   
    char BasepkgNum[11];   
    struct if_card_info if_cards[16];
    unsigned char world_addr[6];   
};
    




# 174 "vendparam.h"


# 6 "sys_call.c" 2




 

void main(void)
{
        int i;
        time_t t = 0;
        struct vend_params my_vp;
        size_t my_vp_size = sizeof(struct vend_params);

        printf("Slotnum: %d\n", my_vp.SlotNum);
        if ((i = syscall((191 ^ (9  << 20)) , &my_vp, &my_vp_size, 0, 0)) < 0)
        {
                perror("sys_vend_param");
                printf("syscall() return value: %d\n", i);
                return;
        }

        printf("Slotnum: %d\n", my_vp.SlotNum);
        return;
}

Reply via email to