]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/findlib/bfile.c
Fix #1370 about the implementation of the "Exclude Dir Containing" option on FD.
[bacula/bacula] / bacula / src / findlib / bfile.c
index f7a65f0b2b007cb83ca00a13899f731efacd7025..7ba1fca33040371678ff4b12aa8e4e1721bcd007 100644 (file)
@@ -169,6 +169,10 @@ const char *stream_to_ascii(int stream)
       return _("Solaris Specific ACL attribs");
    case STREAM_ACL_SOLARIS_ACE:
       return _("Solaris Specific ACL attribs");
+   case STREAM_XATTR_SOLARIS_SYS:
+      return _("Solaris Specific Extensible attribs or System Extended attribs");
+   case STREAM_XATTR_SOLARIS:
+      return _("Solaris Specific Extended attribs");
    case STREAM_XATTR_DARWIN:
       return _("Darwin Specific Extended attribs");
    case STREAM_XATTR_FREEBSD:
@@ -473,13 +477,16 @@ int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode)
       free_pool_memory(win32_fname);
       return bfd->mode == BF_CLOSED ? -1 : 1;
    }
-   Dmsg0(50, "=== NOT plugin\n");
+   Dmsg0(50, "=== NO plugin\n");
 
-   if (!(p_CreateFileA || p_CreateFileW))
+   if (!(p_CreateFileA || p_CreateFileW)) {
+      Dmsg0(50, "No CreateFileA and no CreateFileW!!!!!\n");
       return 0;
+   }
 
-   if (p_CreateFileW && p_MultiByteToWideChar)
+   if (p_CreateFileW && p_MultiByteToWideChar) {
       make_win32_path_UTF8_2_wchar(&win32_fname_wchar, fname);
+   }
 
    if (flags & O_CREAT) {             /* Create */
       if (bfd->use_backup_api) {
@@ -492,6 +499,7 @@ int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode)
 
       if (p_CreateFileW && p_MultiByteToWideChar) {   
          // unicode open for create write
+         Dmsg1(100, "Create CreateFileW=%s\n", win32_fname);
          bfd->fh = p_CreateFileW((LPCWSTR)win32_fname_wchar,
                 dwaccess,                /* Requested access */
                 0,                       /* Shared mode */
@@ -501,6 +509,7 @@ int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode)
                 NULL);                   /* TemplateFile */
       } else {
          // ascii open
+         Dmsg1(100, "Create CreateFileA=%s\n", win32_fname);
          bfd->fh = p_CreateFileA(win32_fname,
                 dwaccess,                /* Requested access */
                 0,                       /* Shared mode */
@@ -523,6 +532,7 @@ int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode)
 
       if (p_CreateFileW && p_MultiByteToWideChar) {   
          // unicode open for open existing write
+         Dmsg1(100, "Write only CreateFileW=%s\n", win32_fname);
          bfd->fh = p_CreateFileW((LPCWSTR)win32_fname_wchar,
                 dwaccess,                /* Requested access */
                 0,                       /* Shared mode */
@@ -532,6 +542,7 @@ int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode)
                 NULL);                   /* TemplateFile */
       } else {
          // ascii open
+         Dmsg1(100, "Write only CreateFileA=%s\n", win32_fname);
          bfd->fh = p_CreateFileA(win32_fname,
                 dwaccess,                /* Requested access */
                 0,                       /* Shared mode */
@@ -558,6 +569,7 @@ int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode)
 
       if (p_CreateFileW && p_MultiByteToWideChar) {   
          // unicode open for open existing read
+         Dmsg1(100, "Read CreateFileW=%s\n", win32_fname);
          bfd->fh = p_CreateFileW((LPCWSTR)win32_fname_wchar,
                 dwaccess,                /* Requested access */
                 dwshare,                 /* Share modes */
@@ -567,6 +579,7 @@ int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode)
                 NULL);                   /* TemplateFile */
       } else {
          // ascii open 
+         Dmsg1(100, "Read CreateFileA=%s\n", win32_fname);
          bfd->fh = p_CreateFileA(win32_fname,
                 dwaccess,                /* Requested access */
                 dwshare,                 /* Share modes */
@@ -937,6 +950,11 @@ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
    free_pool_memory(rsrc_fname);
    return bfd->fid;
 }
+#else
+int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
+{
+   return -1;
+}
 #endif