1// Copyright 2022 The ChromiumOS Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5use std::fs::OpenOptions; 6use std::os::windows::fs::OpenOptionsExt; 7 8use winapi::um::winnt::FILE_SHARE_READ; 9 10pub fn set_extra_open_opts(opts: &mut OpenOptions) { 11 // Allow other applications to read the memory region. This is useful when 12 // folks want to tail the pstore file, and would fail without this setting. 13 opts.share_mode(FILE_SHARE_READ); 14} 15 16