Changeset 3fe9ac238253c6c7f56a2a13a8aa6808d1a7ccd9

Show
Ignore:
Timestamp:
01/17/10 16:00:08 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1263744008 +0000
git-parent:

[65e66a854c8859d0db7a208b25f0080c8c25eef2]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1263744008 +0000
Message:

refs #34

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/utils/noit_log.c

    r725c93d r3fe9ac2  
    9292    return -1; 
    9393  } 
    94   ls->op_ctx = (void *)fd; 
     94  ls->op_ctx = (void *)(vpsized_int)fd; 
    9595  return 0; 
    9696} 
     
    9999  if(ls->path) { 
    100100    int newfd, oldfd; 
    101     oldfd = (int)ls->op_ctx; 
     101    oldfd = (int)(vpsized_int)ls->op_ctx; 
    102102    newfd = open(ls->path, O_CREAT|O_WRONLY|O_APPEND, ls->mode); 
    103103    if(newfd >= 0) { 
    104       ls->op_ctx = (void *)newfd; 
     104      ls->op_ctx = (void *)(vpsized_int)newfd; 
    105105      if(oldfd >= 0) close(oldfd); 
    106106      return 0; 
     
    112112posix_logio_write(noit_log_stream_t ls, const void *buf, size_t len) { 
    113113  int fd; 
    114   fd = (int)ls->op_ctx; 
     114  fd = (int)(vpsized_int)ls->op_ctx; 
    115115  if(fd < 0) return -1; 
    116116  return write(fd, buf, len); 
     
    119119posix_logio_close(noit_log_stream_t ls) { 
    120120  int fd; 
    121   fd = (int)ls->op_ctx; 
     121  fd = (int)(vpsized_int)ls->op_ctx; 
    122122  return close(fd); 
    123123} 
     
    126126  int fd; 
    127127  struct stat sb; 
    128   fd = (int)ls->op_ctx; 
     128  fd = (int)(vpsized_int)ls->op_ctx; 
    129129  if(fstat(fd, &sb) == 0) { 
    130130    return (size_t)sb.st_size; 
     
    370370  ls->name = strdup(name); 
    371371  ls->ops = &posix_logio_ops; 
    372   ls->op_ctx = (void *)fd; 
     372  ls->op_ctx = (void *)(vpsized_int)fd; 
    373373  ls->enabled = 1; 
    374374  ls->config = config;