当前位置: 首页>>代码示例>>C++>>正文


C++ DBG_DEBUG函数代码示例

本文整理汇总了C++中DBG_DEBUG函数的典型用法代码示例。如果您正苦于以下问题:C++ DBG_DEBUG函数的具体用法?C++ DBG_DEBUG怎么用?C++ DBG_DEBUG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DBG_DEBUG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: cephwrap_disk_free

static uint64_t cephwrap_disk_free(struct vfs_handle_struct *handle,
				const struct smb_filename *smb_fname,
				uint64_t *bsize,
				uint64_t *dfree,
				uint64_t *dsize)
{
	struct statvfs statvfs_buf;
	int ret;

	if (!(ret = ceph_statfs(handle->data, smb_fname->base_name,
			&statvfs_buf))) {
		/*
		 * Provide all the correct values.
		 */
		*bsize = statvfs_buf.f_bsize;
		*dfree = statvfs_buf.f_bavail;
		*dsize = statvfs_buf.f_blocks;
		DBG_DEBUG("[CEPH] bsize: %llu, dfree: %llu, dsize: %llu\n",
			llu(*bsize), llu(*dfree), llu(*dsize));
		return *dfree;
	} else {
		DBG_DEBUG("[CEPH] ceph_statfs returned %d\n", ret);
		WRAP_RETURN(ret);
	}
}
开发者ID:Alexander--,项目名称:samba,代码行数:25,代码来源:vfs_ceph.c

示例2: GWEN_PathManager_FindFile

int GWEN_PathManager_FindFile(const char *destLib,
                              const char *pathName,
                              const char *fileName,
                              GWEN_BUFFER *fbuf) {
  GWEN_DB_NODE *dbT;

  assert(gwen__paths);
  dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST,
                       destLib);
  if (dbT) {
    dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST,
                         pathName);
    if (dbT) {
      int i;
      const char *s;
      GWEN_DB_NODE *dbN;
      GWEN_BUFFER *tbuf;

      tbuf=GWEN_Buffer_new(0, 256, 0, 1);

      /* check all paths */
      dbN=GWEN_DB_FindFirstGroup(dbT, "pair");
      while(dbN) {
        for (i=0; ; i++) {
          s=GWEN_DB_GetCharValue(dbN, "path", i, 0);
          if (!s)
            break;
          else {
            FILE *f;

            GWEN_Buffer_AppendString(tbuf, s);
            GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S);
            GWEN_Buffer_AppendString(tbuf, fileName);
            DBG_DEBUG(GWEN_LOGDOMAIN, "Trying \"%s\"",
                      GWEN_Buffer_GetStart(tbuf));
            f=fopen(GWEN_Buffer_GetStart(tbuf), "r");
            if (f) {
              fclose(f);
              DBG_DEBUG(GWEN_LOGDOMAIN,
                        "File \"%s\" found in folder \"%s\"",
                        fileName,
                        s);
              GWEN_Buffer_AppendBuffer(fbuf, tbuf);
              GWEN_Buffer_free(tbuf);
              return 0;
            }
            GWEN_Buffer_Reset(tbuf);
          }
        }

        dbN=GWEN_DB_FindNextGroup(dbN, "pair");
      }
      GWEN_Buffer_free(tbuf);
    }
  }

  DBG_INFO(GWEN_LOGDOMAIN, "File \"%s\" not found", fileName);
  return GWEN_ERROR_NOT_FOUND;
}
开发者ID:Zauberstuhl,项目名称:gwenhywfar,代码行数:59,代码来源:pathmanager.c

示例3: cephwrap_telldir

static long cephwrap_telldir(struct vfs_handle_struct *handle, DIR *dirp)
{
	long ret;
	DBG_DEBUG("[CEPH] telldir(%p, %p)\n", handle, dirp);
	ret = ceph_telldir(handle->data, (struct ceph_dir_result *) dirp);
	DBG_DEBUG("[CEPH] telldir(...) = %ld\n", ret);
	WRAP_RETURN(ret);
}
开发者ID:Alexander--,项目名称:samba,代码行数:8,代码来源:vfs_ceph.c

示例4: DBG_DEBUG

GWEN_XMLNODE *GWEN_XMLNode_Path_Surface(GWEN_XMLNODE_PATH *np) {
  if (np->pos==0) {
    DBG_DEBUG(GWEN_LOGDOMAIN, "Root reached");
    return 0;
  }
  DBG_DEBUG(GWEN_LOGDOMAIN, "Surfaced to %d", np->pos-1);
  return np->nodes[--np->pos];
}
开发者ID:aqbanking,项目名称:gwenhywfar,代码行数:8,代码来源:xml.c

示例5: cephwrap_closedir

static int cephwrap_closedir(struct vfs_handle_struct *handle, DIR *dirp)
{
	int result;

	DBG_DEBUG("[CEPH] closedir(%p, %p)\n", handle, dirp);
	result = ceph_closedir(handle->data, (struct ceph_dir_result *) dirp);
	DBG_DEBUG("[CEPH] closedir(...) = %d\n", result);
	WRAP_RETURN(result);
}
开发者ID:Alexander--,项目名称:samba,代码行数:9,代码来源:vfs_ceph.c

示例6: cephwrap_rmdir

static int cephwrap_rmdir(struct vfs_handle_struct *handle,
			const struct smb_filename *smb_fname)
{
	int result;

	DBG_DEBUG("[CEPH] rmdir(%p, %s)\n", handle, smb_fname->base_name);
	result = ceph_rmdir(handle->data, smb_fname->base_name);
	DBG_DEBUG("[CEPH] rmdir(...) = %d\n", result);
	WRAP_RETURN(result);
}
开发者ID:Alexander--,项目名称:samba,代码行数:10,代码来源:vfs_ceph.c

示例7: cephwrap_close

static int cephwrap_close(struct vfs_handle_struct *handle, files_struct *fsp)
{
	int result;

	DBG_DEBUG("[CEPH] close(%p, %p)\n", handle, fsp);
	result = ceph_close(handle->data, fsp->fh->fd);
	DBG_DEBUG("[CEPH] close(...) = %d\n", result);

	WRAP_RETURN(result);
}
开发者ID:Alexander--,项目名称:samba,代码行数:10,代码来源:vfs_ceph.c

示例8: cephwrap_pread

static ssize_t cephwrap_pread(struct vfs_handle_struct *handle, files_struct *fsp, void *data,
			size_t n, off_t offset)
{
	ssize_t result;

	DBG_DEBUG("[CEPH] pread(%p, %p, %p, %llu, %llu)\n", handle, fsp, data, llu(n), llu(offset));

	result = ceph_read(handle->data, fsp->fh->fd, data, n, offset);
	DBG_DEBUG("[CEPH] pread(...) = %llu\n", llu(result));
	WRAP_RETURN(result);
}
开发者ID:Alexander--,项目名称:samba,代码行数:11,代码来源:vfs_ceph.c

示例9: AHB_DTAUS__AddNum

int AHB_DTAUS__AddNum(GWEN_BUFFER *dst,
                      unsigned int size,
                      const char *s) {
  unsigned int i, j;

  assert(dst);
  assert(s);

  DBG_DEBUG(AQBANKING_LOGDOMAIN, "Adding num : %s", s);

  i=strlen(s);
  if (i>size) {
    /* Error out here because e.g. truncated BLZ will lead to failed jobs. */
    DBG_ERROR(AQBANKING_LOGDOMAIN, "Number \"%s\" too long: Has length %d but must not be longer than %d characters",
	      s, i, size);
    return -1;
  }
  j=size-i;
  if (j) {
    unsigned int k;

    for (k=0; k<j; k++)
      GWEN_Buffer_AppendByte(dst, '0');
  }
  GWEN_Buffer_AppendString(dst, s);
  return 0;
}
开发者ID:Zauberstuhl,项目名称:aqbanking,代码行数:27,代码来源:dtaus-export.c

示例10: AHB_DTAUS__AddDtaWord

int AHB_DTAUS__AddDtaWord(GWEN_BUFFER *dst,
			  unsigned int size,
			  const char *s) {
  unsigned int i;
  unsigned int ssize;

  assert(dst);
  assert(size);
  assert(s);

  DBG_DEBUG(AQBANKING_LOGDOMAIN, "Adding DTA word: %s", s);

  ssize=strlen(s);
  if (ssize>size) {
    /* Error out here because e.g. truncated accountid will lead to failed jobs. */
    DBG_ERROR(AQBANKING_LOGDOMAIN, "Word \"%s\" too long: Has length %d but must not be longer than %d characters",
	      s, ssize, size);
    return -1;
  }

  for (i=0; i<size; i++) {
    char c;

    if (i>=ssize)
      c=0;
    else
      c=s[i];

    if (c)
      GWEN_Buffer_AppendByte(dst, c);
    else
      GWEN_Buffer_AppendByte(dst, ' ');
  } /* for */
  return 0;
}
开发者ID:Zauberstuhl,项目名称:aqbanking,代码行数:35,代码来源:dtaus-export.c

示例11: GWEN_Date__sampleTmplChars

void GWEN_Date__sampleTmplChars(GWEN_UNUSED const GWEN_DATE *t, const char *tmpl,
                                GWEN_UNUSED GWEN_BUFFER *buf,
                                GWEN_DATE_TMPLCHAR_LIST *ll) {
  const char *s;

  s=tmpl;
  while(*s) {
    if (strchr("YMDWw", *s)) {
      GWEN_DATE_TMPLCHAR *e;

      e=GWEN_Date__findTmplChar(ll, *s);
      if (!e) {
        /* new entry, create it */
        e=GWEN_DateTmplChar_new(*s);
        GWEN_DateTmplChar_List_Add(e, ll);
      }
      assert(e);
      e->count++;
    }
    else {
      DBG_DEBUG(GWEN_LOGDOMAIN, "Unknown character in template (%02x)",
                *s);
    }
    s++;
  }
}
开发者ID:Zauberstuhl,项目名称:gwenhywfar,代码行数:26,代码来源:gwendate.c

示例12: Debug_CreateKeyFingerprint

unsigned int Debug_CreateKeyFingerprint(CRYP_RSAKEY *key1) {
  IPCMESSAGE *kmsg1;
  int ks1;
  ERRORCODE err;
  const char *ptr1;
  unsigned int fp;

  kmsg1=IPCMessage_new();
  IPCMessage_SetBuffer(kmsg1,0,4096);

  err=Cryp_RsaKey_ToMessage(key1, kmsg1, 1);
  if (!Error_IsOk(err)) {
    DBG_ERROR_ERR(err);
  }

  ks1=IPCMessage_GetMessageSize(kmsg1);

  ptr1=IPCMessage_GetMessageBegin(kmsg1);
  fp=0;
  while(ks1) {
    fp+=(unsigned char)(*ptr1);
    ptr1++;
    ks1--;
  } /* while */
  IPCMessage_free(kmsg1);

  DBG_DEBUG("Fingerprint is: %08x\n",fp);
  return fp;
}
开发者ID:BackupTheBerlios,项目名称:aqbackup,代码行数:29,代码来源:ctservice.c

示例13: GWEN_Directory_FindFileInPaths

int GWEN_Directory_FindFileInPaths(const GWEN_STRINGLIST *paths,
                                   const char *filePath,
                                   GWEN_BUFFER *fbuf) {
  GWEN_STRINGLISTENTRY *se;

  se=GWEN_StringList_FirstEntry(paths);
  while(se) {
    GWEN_BUFFER *tbuf;
    FILE *f;

    tbuf=GWEN_Buffer_new(0, 256, 0, 1);
    GWEN_Buffer_AppendString(tbuf, GWEN_StringListEntry_Data(se));
    GWEN_Buffer_AppendString(tbuf, DIRSEP);
    GWEN_Buffer_AppendString(tbuf, filePath);
    DBG_VERBOUS(GWEN_LOGDOMAIN, "Trying \"%s\"",
                GWEN_Buffer_GetStart(tbuf));
    f=fopen(GWEN_Buffer_GetStart(tbuf), "r");
    if (f) {
      fclose(f);
      DBG_DEBUG(GWEN_LOGDOMAIN,
                "File \"%s\" found in folder \"%s\"",
                filePath,
                GWEN_StringListEntry_Data(se));
      GWEN_Buffer_AppendBuffer(fbuf, tbuf);
      GWEN_Buffer_free(tbuf);
      return 0;
    }
    GWEN_Buffer_free(tbuf);

    se=GWEN_StringListEntry_Next(se);
  }

  DBG_INFO(GWEN_LOGDOMAIN, "File \"%s\" not found", filePath);
  return GWEN_ERROR_NOT_FOUND;
}
开发者ID:aqbanking,项目名称:gwenhywfar,代码行数:35,代码来源:directory_all.c

示例14: prefork_terminate

/* called when a task goes down */
static void prefork_terminate(struct tevent_context *ev,
			      struct loadparm_context *lp_ctx,
			      const char *reason,
			      void *process_context)
{
	DBG_DEBUG("called with reason[%s]\n", reason);
}
开发者ID:DavidMulder,项目名称:samba,代码行数:8,代码来源:process_prefork.c

示例15: streams_xattr_fstat

static int streams_xattr_fstat(vfs_handle_struct *handle, files_struct *fsp,
			       SMB_STRUCT_STAT *sbuf)
{
	struct smb_filename *smb_fname_base = NULL;
	int ret = -1;
	struct stream_io *io = (struct stream_io *)
		VFS_FETCH_FSP_EXTENSION(handle, fsp);

	if (io == NULL || fsp->base_fsp == NULL) {
		return SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf);
	}

	DBG_DEBUG("streams_xattr_fstat called for %s\n", fsp_str_dbg(io->fsp));

	if (!streams_xattr_recheck(io)) {
		return -1;
	}

	/* Create an smb_filename with stream_name == NULL. */
	smb_fname_base = synthetic_smb_fname(talloc_tos(),
					io->base,
					NULL,
					NULL,
					fsp->fsp_name->flags);
	if (smb_fname_base == NULL) {
		errno = ENOMEM;
		return -1;
	}

	if (smb_fname_base->flags & SMB_FILENAME_POSIX_PATH) {
		ret = SMB_VFS_LSTAT(handle->conn, smb_fname_base);
	} else {
		ret = SMB_VFS_STAT(handle->conn, smb_fname_base);
	}
	*sbuf = smb_fname_base->st;

	if (ret == -1) {
		TALLOC_FREE(smb_fname_base);
		return -1;
	}

	sbuf->st_ex_size = get_xattr_size(handle->conn,
					smb_fname_base, io->xattr_name);
	if (sbuf->st_ex_size == -1) {
		TALLOC_FREE(smb_fname_base);
		SET_STAT_INVALID(*sbuf);
		return -1;
	}

	DEBUG(10, ("sbuf->st_ex_size = %d\n", (int)sbuf->st_ex_size));

	sbuf->st_ex_ino = stream_inode(sbuf, io->xattr_name);
	sbuf->st_ex_mode &= ~S_IFMT;
	sbuf->st_ex_mode &= ~S_IFDIR;
        sbuf->st_ex_mode |= S_IFREG;
        sbuf->st_ex_blocks = sbuf->st_ex_size / STAT_ST_BLOCKSIZE + 1;

	TALLOC_FREE(smb_fname_base);
	return 0;
}
开发者ID:Alexander--,项目名称:samba,代码行数:60,代码来源:vfs_streams_xattr.c


注:本文中的DBG_DEBUG函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。