Skip to content

Commit

Permalink
Merge pull request #1 from weafon/vmfs6-64
Browse files Browse the repository at this point in the history
Add new FS Info magic, VMFSL_FSINFO_MAGIC
  • Loading branch information
teward authored Apr 5, 2022
2 parents 3f19634 + 84e094a commit 582b525
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libvmfs/vmfs_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright (C) 2009 Christophe Fillot <cf@utc.fr>
* Copyright (C) 2009,2012 Mike Hommey <mh@glandium.org>
* Copyright (C) 2018 Weafon Tsao <weafon.tsao@accelstor.com>
* Copyright (C) 2020 VMware, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -67,7 +68,7 @@ static int vmfs_fsinfo_read(vmfs_fs_t *fs)

fsi->magic = read_le32(buf,VMFS_FSINFO_OFS_MAGIC);

if (fsi->magic != VMFS_FSINFO_MAGIC) {
if (fsi->magic != VMFS_FSINFO_MAGIC && fsi->magic != VMFSL_FSINFO_MAGIC) {
fprintf(stderr,"VMFS FSInfo: invalid magic number 0x%8.8x\n",fsi->magic);
return(-1);
}
Expand Down
2 changes: 2 additions & 0 deletions libvmfs/vmfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright (C) 2009 Christophe Fillot <cf@utc.fr>
* Copyright (C) 2009 Mike Hommey <mh@glandium.org>
* Copyright (C) 2018 Weafon Tsao <weafon.tsao@accelstor.com>
* Copyright (C) 2020 VMware, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -24,6 +25,7 @@
/* === FS Info === */
#define VMFS_FSINFO_BASE 0x0200000
#define VMFS_FSINFO_MAGIC 0x2fabf15e
#define VMFSL_FSINFO_MAGIC 0x2fabf15f

struct vmfs_fsinfo_raw {
uint32_t magic;
Expand Down

0 comments on commit 582b525

Please sign in to comment.